Skip to content

Test runner's output is hard to read due to blue-on-black text #58937

@iccir

Description

@iccir

Node's test runner currently uses colors.blue for info text. This text is hard to read on a black background.

While the exact color will vary depending on operating system, monitor color profile, and terminal settings; ANSI escape code ESC[34m will typically generate a blue somewhere between (0, 0, 128) and (0, 0, 238). On a black background, this has a contrast ratio between ~1.3:1 (worst case) and ~2.2:1 (best case). That's far below the 4.5:1 to meet WCAG AA.

I recognize that, historically, meeting color contrast guidelines is not in scope for command-line tools, and that end users have the ability to customize it in their terminal application.

That said, colors.blue is probably not an ideal choice for large amounts of text. While colors.red has a similar issue, its usage is limited. colors.yellow and colors.green are fine.

Could there be an option to customize color output in the test runner?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.staletest_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions