Console-Docs
Console-Docs copied to clipboard
DECAC support needs to be documented
- https://github.com/microsoft/terminal/issues/6574#issuecomment-1176558196
- https://github.com/microsoft/terminal/pull/13058
- DECAC docs (search for "DECAC—Assign Color")
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
and264
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 useDECAC 2
. @j4james in commit a69ce89Therefore, this will change the tab background color to any RGB value (
OSC 4
):![]()
And this will change the tab background color to "whatever the background color of the Terminal is" (
DECAC
):![]()
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 (!)