Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DECAC support needs to be documented #267

Open
zadjii-msft opened this issue Jul 6, 2022 · 1 comment
Open

DECAC support needs to be documented #267

zadjii-msft opened this issue Jul 6, 2022 · 1 comment
Labels
Help-Wanted We encourage anyone to jump in on these. Size-Small A paragraph or so

Comments

@zadjii-msft
Copy link
Contributor

@DHowett
Copy link
Collaborator

DHowett commented Jul 6, 2022

Copying my notes from the original thread:

In short, though: DECAC can assign the frame and default indices each to any other color from the xterm 256-color palette (by index -- therefore, if you reassign what that index means, you can change that color no matter where it is used).

James' PR also added 263 and 264 as virtual indices that contain the tab foreground and background, respectively. You can change them using OSC 4. These are technically unrelated to DECAC[1].

So at runtime, you can change the tab color programmatically by setting the color table entry at index 262 (sic: I think he meant 264) using OSC 4 (assuming you need a specific RGB value). Otherwise if you just want to set the tab color to an existing color index, you can use DECAC 2.
@j4james in commit a69ce89

Therefore, this will change the tab background color to any RGB value (OSC 4):

image

And this will change the tab background color to "whatever the background color of the Terminal is" (DECAC):

image

Our documentation should clarify these new color indices since we're making a contract out of them, and it should further clarify the purpose of DECAC specifically.

[1] Technically. They're related because you can use DECAC to reassign "frame colors" to any two indices instead of 263 and 264.

DECAC is one thing, and the new indices are another. Two doc notes -- and probably something we should consider supporting in conhost using DWMWA too (!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help-Wanted We encourage anyone to jump in on these. Size-Small A paragraph or so
Projects
None yet
Development

No branches or pull requests

2 participants