Skip to content

Colored output looks bad on black-on-white terminals #16567

@evmar

Description

@evmar

TypeScript's --pretty output produces line numbers that show up as black-on-dark-gray when run on a terminal that is black-on-white. See the number on the left here. (Sorry for the giant picture, I run a hidpi screen.)

image

Suggested fix: if you set the background color in the output, also force the foreground color. I guess here you want to force white.

Also note that the special colors 38 and 48 are available for "the terminal's default foreground/background color":
https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions