Skip to content

supports-color breaks coloring #683

Description

@NaNraptor

This line over here defines an ANSI extended color set for bright color which doesn't display correctly: (by incorrectly I mean it's just bold white color)

https://github.com/visionmedia/debug/blob/5c7c61dc0df0db4eb5de25707d8cd1b9be1add4f/src/node.js#L169

It shouldn't(?) have a traling ;1 after ${colorCode}. So the line should like:

const prefix = ` ${colorCode}m${name} \u001B[0m`;

This fixes the bug (for me :) )

EDIT: This supports my observation 256 colors

Also from the article:

Note that the bright versions of the background colors do not change the background, but rather make the foreground text brighter. This is unintuitive but that's just the way it works.

and the ;1 option only applies to \u001b[44 ie background colors, while the \u001b[38 option for foreground colors does not have such thing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue identifies a malfunction

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions