Skip to content

Detect truecolor support from TERM values #13

Description

@seapagan

detect_env_color_level currently detects truecolor from COLORTERM=truecolor or COLORTERM=24bit, but does not detect truecolor-capable TERM values.

Examples that should resolve to ColorLevel::TrueColor:

  • TERM=xterm-truecolor with COLORTERM unset
  • TERM=screen-24bit with COLORTERM unset

TERM=dumb should continue to resolve to ColorLevel::NoColor, and TERM values containing 256color should continue to resolve to ColorLevel::Ansi256.

This keeps truecolor detection aligned with terminals that advertise 24-bit support through TERM rather than COLORTERM.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions