Skip to content

Adapt CLI tooling colours to dark or light terminal background #2778

Description

@AlexSkrypnyk

Summary

Vortex CLI tooling prints coloured output (status messages, prompts, pass/fail markers, and similar). The colour palette is fixed, so colours tuned to be readable on a dark terminal background can wash out or become unreadable on a light background, and vice versa. The tooling should adapt its colours to the terminal's currently selected background so output stays legible regardless of the user's terminal theme.

Details

Problem: A single fixed colour set cannot stay readable on both dark and light terminal backgrounds. Low-contrast combinations (for example light grey on white, or dark blue on black) make output hard or impossible to read for users whose terminal theme differs from the one the palette was tuned for.

Desired behaviour: Detect whether the terminal background is dark or light and select the matching colour variant, falling back gracefully to a safe, theme-neutral palette when detection is not possible.

Possible approaches (not yet decided):

  • Query the terminal background with the OSC 11 escape sequence and branch on the reported luminance.
  • Read the COLORFGBG environment variable where the terminal exports it.
  • Provide a manual override (environment variable or flag) for terminals that do not report their background and for CI / non-interactive contexts.
  • Respect NO_COLOR and non-TTY output by disabling colour entirely.

The implementation approach is open - raising this to track the need. To be worked out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    BACKLOG
    Status
    BACKLOG

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions