Skip to content

Support querying the colors via OSC #3718

@egmontkob

Description

@egmontkob

OSC 4, 10, 11 and friends, with a ? instead of a color, respond with the current value of that color in xterm, vte and quite a few other terminals, always using the rgb:RRRR/GGGG/BBBB notation, and the same terminator (ST vs. BEL) as in the query.

Examples:

echo -ne '\e]4;1;?\e\\'; cat

echo -ne '\e]11;?\a'; cat

This allows apps (e.g. vim) to automatically pick a color scheme depending on whether the user has a dark-on-bright on bright-on-dark color scheme. I don't know if it's actually being used in practice, though :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-ConhostFor issues in the Console codebase

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions