ESC ] 4 ; <i> ; rgb : <r> / <g> / <b> ESC ... in WindowsTerminal? #15067

Closed
opened 2026-01-31 04:27:27 +00:00 by claunia · 29 comments
Owner

Originally created by @vefatica on GitHub (Sep 3, 2021).

That works in a console. Below I'm changing color 0, which is the background color.

Before:

image

After:

image

Should it work in WindowsTerminal? It doesn't.

Originally created by @vefatica on GitHub (Sep 3, 2021). That works in a console. Below I'm changing color 0, which is the background color. Before: ![image](https://user-images.githubusercontent.com/61856645/131938382-88854fc2-87a4-442b-8695-5b211ccd81a4.png) After: ![image](https://user-images.githubusercontent.com/61856645/131938403-24adda40-2b58-4402-bb42-8af007324cb0.png) Should it work in WindowsTerminal? It doesn't.
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 04:27:27 +00:00
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

You are redefining color 0, which is one of the colors in the 16-color palette (usually assigned to black.)

The vintage console only supports having indexed colors for the foreground or the background.

All other terminals, WT included, support 18 paletted colors: the 16 from ANSI/VT, plus a foreground and background which are independent.

You'll want to use OSC 11 (if I remember properly) to set the background, not OSC 4 to overwrite black.

@DHowett commented on GitHub (Sep 3, 2021): You are redefining color 0, which is one of the colors in the 16-color palette (usually assigned to black.) The vintage console only supports having indexed colors for the foreground or the background. All other terminals, WT included, support *18* paletted colors: the 16 from ANSI/VT, plus a foreground and background which are independent. You'll want to use OSC 11 (if I remember properly) to set the background, not OSC 4 to overwrite black.
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

My only reference is https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences which doesn't mention OSC 11.

Is there a better reference, one that describes OSC 11 in detail?

@vefatica commented on GitHub (Sep 3, 2021): My only reference is [https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) which doesn't mention OSC 11. Is there a better reference, one that describes OSC 11 in detail?
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

Hmmm! If I have the terminators right [0x7 (BEL) or 0x9C (ST?)], I find that

OSC]10;16;... changes the color of the background

OSC]10;17;... changes the color of the foreground

Are they the last two colors in the 18-color palette you spoke of?

And OSC]11;x;... changes the color of the cursor (the x doesn't seem to matter)

I wish I knew how it's supposed to work.

@vefatica commented on GitHub (Sep 3, 2021): Hmmm! If I have the terminators right [0x7 (BEL) or 0x9C (ST?)], I find that OSC]10;16;... changes the color of the background OSC]10;17;... changes the color of the foreground Are they the last two colors in the 18-color palette you spoke of? And OSC]11;x;... changes the color of the cursor (the x doesn't seem to matter) I wish I knew how it's supposed to work.
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

While the sequences from my previous post work as stated, I guess I didn't try hard enough. These also work and are as I have found documeted.

ESC]10;rgb:r/g/bST ... foreground color
ESC]11;rgb:r/g/bST ... background color
ESC]12;rgb:r/g/bST ... cursor color

@vefatica commented on GitHub (Sep 3, 2021): While the sequences from my previous post work as stated, I guess I didn't try hard enough. These also work and are as I have found documeted. ESC]10;rgb:r/g/bST ... foreground color ESC]11;rgb:r/g/bST ... background color ESC]12;rgb:r/g/bST ... cursor color
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

So! The documentation for these is right under the "Operating System Commands" section in the inimitable xterm control sequences guide. We have a backlog item booked to update our docs with all our supported sequences and the versions they came out in.

Your finding is pretty interesting! This set of OSC can be "chained" -- if you start with 10, and specify multiple colors (For your sequence, E]10;16;XYZ, 16 here was interpreted as the first color, and XYZ the second!), you will set resources 10, 11, 12, ...

image

"`e]10;rgb:ff/00/00;rgb:00/ff/00;rgb:00/00/ff`e\"
       ^ FOREGROUND ^ BACKGROUND ^ CURSOR

The 10 indicates that we wanted to start with the foreground.

You could do the same thing with three sequences, E]10;, E]11; and E]12;.

@DHowett commented on GitHub (Sep 3, 2021): So! The documentation for these is right under [the "Operating System Commands" section](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands) in the inimitable xterm control sequences guide. We have a backlog item booked to update our docs with all our supported sequences and the versions they came out in. Your finding is pretty interesting! This set of OSC can be "chained" -- if you start with `10`, and specify multiple colors (For your sequence, `E]10;16;XYZ`, `16` here was interpreted as the first color, and `XYZ` the second!), you will set resources 10, 11, 12, ... ![image](https://user-images.githubusercontent.com/189190/132035409-7659c8c7-df1f-4ade-bae4-0050f322ada7.png) ``` "`e]10;rgb:ff/00/00;rgb:00/ff/00;rgb:00/00/ff`e\" ^ FOREGROUND ^ BACKGROUND ^ CURSOR ``` The 10 indicates that we wanted to start with the foreground. You could do the same thing with three sequences, `E]10;`, `E]11;` and `E]12;`.
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

(We do not support all the resources specified in OSC Ps ; Pt ST)

@DHowett commented on GitHub (Sep 3, 2021): (We do not support all the resources specified in `OSC Ps ; Pt ST`)
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

And finally, last note before I give you space to reply (!) (😄)

The venerated Console also supports this "separate" palette, though it does make some applications act strange.

It's in the "Terminal" tab in the old settings sheet, marked down as "experimental" terminal settings, with a link to a fairly wordy blog post explaining them:

image

@DHowett commented on GitHub (Sep 3, 2021): And finally, last note before I give you space to reply (!) (:smile:) The venerated Console also supports this "separate" palette, though it does make some applications act strange. It's in the "Terminal" tab in the old settings sheet, marked down as "experimental" terminal settings, with a link to a [fairly wordy blog post explaining them](https://devblogs.microsoft.com/commandline/new-experimental-console-features/): ![image](https://user-images.githubusercontent.com/189190/132037330-506b232c-7769-4ee4-b226-349299dd19d3.png)
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

Thanks for all the info, especially about "chaining" the sequences.

I have never played with that tab in the settings. Do "separate foreground" and "separate background" act as two "extra" colors (perhaps in the 18-color palette you mentioned earlier)?

@vefatica commented on GitHub (Sep 3, 2021): Thanks for all the info, especially about "chaining" the sequences. I have never played with that tab in the settings. Do "separate foreground" and "separate background" act as two "extra" colors (perhaps in the 18-color palette you mentioned earlier)?
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

Yep, they are exactly that! They are accessible in VT using SGR 39 and 49 ("default foreground", "default background"). There's also cursor color, which is settable with OSC 12 but does not map to a SGR.

@DHowett commented on GitHub (Sep 3, 2021): Yep, they are exactly that! They are accessible in VT using SGR `39` and `49` ("default foreground", "default background"). There's also cursor color, which is settable with OSC 12 but does not map to a SGR.
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

Yep, they are exactly that! They are accessible in VT using SGR 39 and 49 ("default foreground", "default background").

Are they what ESC[0m gives?

@vefatica commented on GitHub (Sep 3, 2021): > Yep, they are exactly that! They are accessible in VT using SGR 39 and 49 ("default foreground", "default background"). Are they what ESC[0m gives?
Author
Owner

@DHowett commented on GitHub (Sep 3, 2021):

Indeed they are. For console, they replace the old "default" colors in any place except the API (which doesn't report with a data type large enough to express more colors :()

@DHowett commented on GitHub (Sep 3, 2021): Indeed they are. For console, they replace the old "default" colors in any place except the API (which doesn't report with a data type large enough to express more colors :()
Author
Owner

@vefatica commented on GitHub (Sep 3, 2021):

Aha! That's nice. So I can have "default" colors that are not a combination of two colors from the console's 16-color palette.

@vefatica commented on GitHub (Sep 3, 2021): Aha! That's nice. So I can have "default" colors that are not a combination of two colors from the console's 16-color palette.
Author
Owner

@vefatica commented on GitHub (Sep 6, 2021):

Aha! That's nice. So I can have "default" colors that are not a combination of two colors from the console's 16-color palette.

In a console, I can set "DefaultForefround" and "DefaultBackground" in the Properties dialog. Can I set them on the fly with a control sequence? I tried SGR 39 and SGR 49 (with 2;r;g;b, as in 38/48); that didn't work. [If that question is answered above, I couldn't find it.]

@vefatica commented on GitHub (Sep 6, 2021): > Aha! That's nice. So I can have "default" colors that are not a combination of two colors from the console's 16-color palette. In a console, I can set "DefaultForefround" and "DefaultBackground" in the Properties dialog. Can I set them on the fly with a control sequence? I tried SGR 39 and SGR 49 (with 2;r;g;b, as in 38/48); that didn't work. [If that question is answered above, I couldn't find it.]
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2021):

I tried SGR 39 and SGR 49 (with 2;r;g;b, as in 38/48);

I'm sorry what did you try? You don't need to use the 2;r;g;b bits with 39/49, they'll suffice on their own:

printf "Default text \e[31;42m red on green \e[39m default on green \e[31;49m red on default \n"

image
image
image
image

@zadjii-msft commented on GitHub (Sep 7, 2021): > I tried SGR 39 and SGR 49 (with 2;r;g;b, as in 38/48); I'm sorry what did you try? You don't need to use the `2;r;g;b` bits with `39/49`, they'll suffice on their own: ```printf "Default text \e[31;42m red on green \e[39m default on green \e[31;49m red on default \n"``` ![image](https://user-images.githubusercontent.com/18356694/132357490-b0df2036-f516-4d8a-9c40-509df7c59e96.png) ![image](https://user-images.githubusercontent.com/18356694/132357593-4e8ebafe-0d83-41ca-9af3-0f4cf608f23d.png) ![image](https://user-images.githubusercontent.com/18356694/132357863-95bff4f0-44ce-4309-8ccf-0c380aeb225d.png) ![image](https://user-images.githubusercontent.com/18356694/132358050-689c5002-bc1c-42a6-a969-11d80d11ac4b.png)
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

I'm sorry. I misinterpreted the purpose of SGR 39/49.

What I really want to do is SET (on the fly) the console's default foreground/background and/or WT's defaultForeground/defaultBackground.

Can either or both of those be done?

It's part of a (mostly academic) project to let the user issue a command to change the console's (or WT's) color scheme. Some of the schemes don't work correctly if those fore/back colors are not set.

And (off-topic) ... Are the Creators Update console colors still the default in Windows 10? If so, maybe a "Creators Update" scheme in WT would be appropriate. I added such a scheme myself, works fine. I'll post it if it will be of any value.

@vefatica commented on GitHub (Sep 7, 2021): I'm sorry. I misinterpreted the purpose of SGR 39/49. What I really want to do is SET (on the fly) the console's default foreground/background and/or WT's defaultForeground/defaultBackground. Can either or both of those be done? It's part of a (mostly academic) project to let the user issue a command to change the console's (or WT's) color scheme. Some of the schemes don't work correctly if those fore/back colors are not set. And (off-topic) ... Are the Creators Update console colors still the default in Windows 10? If so, maybe a "Creators Update" scheme in WT would be appropriate. I added such a scheme myself, works fine. I'll post it if it will be of any value.
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2021):

Oh, yea I believe OSC 10 and OSC 11 should set the values of those colors. The properties dialog might not update accordingly - that's not really actively maintained, so I'm not sure about that. IIRC OSC 10&11 are fairly new so you'll need the OpenConsole.exe from the Terminal or Windows 11 to see support for those.

And (off-topic) ... Are the Creators Update console colors still the default in Windows 10? If so, maybe a "Creators Update" scheme in WT would be appropriate. I added such a scheme myself, works fine. I'll post it if it will be of any value.

Yep, those are still the defaults - the scheme we affectionately call "Campbell"

@zadjii-msft commented on GitHub (Sep 7, 2021): Oh, yea I believe OSC 10 and OSC 11 should _set_ the values of those colors. The properties dialog might not update accordingly - that's not really actively maintained, so I'm not sure about that. IIRC OSC 10&11 are fairly new so you'll need the OpenConsole.exe from the Terminal or Windows 11 to see support for those. > And (off-topic) ... Are the Creators Update console colors still the default in Windows 10? If so, maybe a "Creators Update" scheme in WT would be appropriate. I added such a scheme myself, works fine. I'll post it if it will be of any value. Yep, those are still the defaults - the scheme we affectionately call "Campbell"
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

Hmmm! I talked about OSC 10/11 with @DHowett in another thread and for some reason ruled them out. I'll try again. They're not documented for the console. Should they work in a console?

If my REG backup of HKCU\Console is correct, the Creators Update colors are not the same as Campbell. Did they get some tweaking?

@vefatica commented on GitHub (Sep 7, 2021): Hmmm! I talked about OSC 10/11 with @DHowett in another thread and for some reason ruled them out. I'll try again. They're not documented for the console. Should they work in a console? If my REG backup of HKCU\Console is correct, the Creators Update colors are not the same as Campbell. Did they get some tweaking?
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

Everything that works in Terminal will eventually work in Console -- the only hold-up is how long it takes our code changes to get out to public Windows versions.

There is a chance that the Creators' Update (I can't remember when that was) predates Campbell. In that case, the values are the same as the "Vintage" scheme.

@DHowett commented on GitHub (Sep 7, 2021): Everything that works in Terminal will eventually work in Console -- the only hold-up is how long it takes our code changes to get out to public Windows versions. There is a chance that the Creators' Update (I can't remember when that was) _predates_ Campbell. In that case, the values are the same as the "Vintage" scheme.
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

I have these. I'm pretty sure the translations are correct. The order is Campbell, Vintage, CreatorsUpdate.

/*          0         1         2         3         4         5         6         7         8         9        10        11        12        13        14        15            16        17       */
/*        black      red      green    yellow     blue     purple     cyan      white    briBla     bRed     bGreen    bYello    bBlue     bPurpl     bCyan    bWhite         fore      back      */
	{0x0C0C0C, 0x1F0FC5, 0x0EA113, 0x009CC1, 0xDA3700, 0x981788, 0xDD963A, 0xCCCCCC, 0x767676, 0x5648E7, 0x0CC616, 0xA5F1F9, 0xFF783B, 0x9E00B4, 0xD6D661, 0xF2F2F2,     0xCCCCCC, 0x0C0C0C},
	{0x000000, 0x000080, 0x008000, 0x008080, 0x800000, 0x800080, 0x808000, 0xC0C0C0, 0x808080, 0x0000FF, 0x00FF00, 0x00FFFF, 0xFF0000, 0xFF00FF, 0xFFFF00, 0xFFFFFF,     0xC0C0C0, 0x000000},
	{0x0C0C0C, 0x0037DA, 0x13A10E, 0x3A96DD, 0xC50F1F, 0x881798, 0xC19C00, 0xCCCCCC, 0x767676, 0x3B78FF, 0x16C60C, 0x61D6D6, 0xE74856, 0xB4009E, 0xF9F1A5, 0xF2F2F2,     0xCCCCCC, 0x0C0C0C}

Campbell and Vintage are ultimately from settings.json; CreatorsUpdate from these:

"ColorTable00"=dword:000c0c0c
"ColorTable01"=dword:00da3700
"ColorTable02"=dword:000ea113
"ColorTable03"=dword:00dd963a
"ColorTable04"=dword:001f0fc5
"ColorTable05"=dword:00981788
"ColorTable06"=dword:00009cc1
"ColorTable07"=dword:00cccccc
"ColorTable08"=dword:00767676
"ColorTable09"=dword:00ff783b
"ColorTable10"=dword:000cc616
"ColorTable11"=dword:00d6d661
"ColorTable12"=dword:005648e7
"ColorTable13"=dword:009e00b4
"ColorTable14"=dword:00a5f1f9
"ColorTable15"=dword:00f2f2f2

@vefatica commented on GitHub (Sep 7, 2021): I have these. I'm pretty sure the translations are correct. The order is Campbell, Vintage, CreatorsUpdate. ``` /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */ /* black red green yellow blue purple cyan white briBla bRed bGreen bYello bBlue bPurpl bCyan bWhite fore back */ {0x0C0C0C, 0x1F0FC5, 0x0EA113, 0x009CC1, 0xDA3700, 0x981788, 0xDD963A, 0xCCCCCC, 0x767676, 0x5648E7, 0x0CC616, 0xA5F1F9, 0xFF783B, 0x9E00B4, 0xD6D661, 0xF2F2F2, 0xCCCCCC, 0x0C0C0C}, {0x000000, 0x000080, 0x008000, 0x008080, 0x800000, 0x800080, 0x808000, 0xC0C0C0, 0x808080, 0x0000FF, 0x00FF00, 0x00FFFF, 0xFF0000, 0xFF00FF, 0xFFFF00, 0xFFFFFF, 0xC0C0C0, 0x000000}, {0x0C0C0C, 0x0037DA, 0x13A10E, 0x3A96DD, 0xC50F1F, 0x881798, 0xC19C00, 0xCCCCCC, 0x767676, 0x3B78FF, 0x16C60C, 0x61D6D6, 0xE74856, 0xB4009E, 0xF9F1A5, 0xF2F2F2, 0xCCCCCC, 0x0C0C0C} ``` Campbell and Vintage are ultimately from settings.json; CreatorsUpdate from these: ``` "ColorTable00"=dword:000c0c0c "ColorTable01"=dword:00da3700 "ColorTable02"=dword:000ea113 "ColorTable03"=dword:00dd963a "ColorTable04"=dword:001f0fc5 "ColorTable05"=dword:00981788 "ColorTable06"=dword:00009cc1 "ColorTable07"=dword:00cccccc "ColorTable08"=dword:00767676 "ColorTable09"=dword:00ff783b "ColorTable10"=dword:000cc616 "ColorTable11"=dword:00d6d661 "ColorTable12"=dword:005648e7 "ColorTable13"=dword:009e00b4 "ColorTable14"=dword:00a5f1f9 "ColorTable15"=dword:00f2f2f2 ```
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

I extracted this from the default win32 settings embedded in 10.0.15063

ColorTable00: 000000
ColorTable01: 800000
ColorTable02: 008000
ColorTable03: 808000
ColorTable04: 000080
ColorTable05: 800080
ColorTable06: 008080
ColorTable07: C0C0C0
ColorTable08: 808080
ColorTable09: FF0000
ColorTable10: 00FF00
ColorTable11: FFFF00
ColorTable12: 0000FF
ColorTable13: FF00FF
ColorTable14: 00FFFF
ColorTable15: FFFFFF

I extracted this from the config initialization code in the console in 10.0.15063 (you can see the current version here)

    _ColorTable[0] = RGB(0x0000, 0x0000, 0x0000);
    _ColorTable[1] = RGB(0x0000, 0x0000, 0x0080);
    _ColorTable[2] = RGB(0x0000, 0x0080, 0x0000);
    _ColorTable[3] = RGB(0x0000, 0x0080, 0x0080);
    _ColorTable[4] = RGB(0x0080, 0x0000, 0x0000);
    _ColorTable[5] = RGB(0x0080, 0x0000, 0x0080);
    _ColorTable[6] = RGB(0x0080, 0x0080, 0x0000);
    _ColorTable[7] = RGB(0x00C0, 0x00C0, 0x00C0);
    _ColorTable[8] = RGB(0x0080, 0x0080, 0x0080);
    _ColorTable[9] = RGB(0x0000, 0x0000, 0x00FF);
    _ColorTable[10] = RGB(0x0000, 0x00FF, 0x0000);
    _ColorTable[11] = RGB(0x0000, 0x00FF, 0x00FF);
    _ColorTable[12] = RGB(0x00FF, 0x0000, 0x0000);
    _ColorTable[13] = RGB(0x00FF, 0x0000, 0x00FF);
    _ColorTable[14] = RGB(0x00FF, 0x00FF, 0x0000);
    _ColorTable[15] = RGB(0x00FF, 0x00FF, 0x00FF);

As far as I can tell, that's "Vintage", which is pretty curious since I am sure we changed the color scheme at some earlier point. However, I can't find any mention of Campbell's black (ColorTable00) in the windows source tree as of 10.0.15063.

@DHowett commented on GitHub (Sep 7, 2021): I extracted this from the default win32 settings embedded in 10.0.15063 ``` ColorTable00: 000000 ColorTable01: 800000 ColorTable02: 008000 ColorTable03: 808000 ColorTable04: 000080 ColorTable05: 800080 ColorTable06: 008080 ColorTable07: C0C0C0 ColorTable08: 808080 ColorTable09: FF0000 ColorTable10: 00FF00 ColorTable11: FFFF00 ColorTable12: 0000FF ColorTable13: FF00FF ColorTable14: 00FFFF ColorTable15: FFFFFF ``` I extracted this from the config initialization code in the console in 10.0.15063 (you can see the current version [here](https://github.com/microsoft/terminal/blob/424414ec972cff71107cf88aaefeeb0b47d4d302/src/host/settings.cpp#L86)) ``` _ColorTable[0] = RGB(0x0000, 0x0000, 0x0000); _ColorTable[1] = RGB(0x0000, 0x0000, 0x0080); _ColorTable[2] = RGB(0x0000, 0x0080, 0x0000); _ColorTable[3] = RGB(0x0000, 0x0080, 0x0080); _ColorTable[4] = RGB(0x0080, 0x0000, 0x0000); _ColorTable[5] = RGB(0x0080, 0x0000, 0x0080); _ColorTable[6] = RGB(0x0080, 0x0080, 0x0000); _ColorTable[7] = RGB(0x00C0, 0x00C0, 0x00C0); _ColorTable[8] = RGB(0x0080, 0x0080, 0x0080); _ColorTable[9] = RGB(0x0000, 0x0000, 0x00FF); _ColorTable[10] = RGB(0x0000, 0x00FF, 0x0000); _ColorTable[11] = RGB(0x0000, 0x00FF, 0x00FF); _ColorTable[12] = RGB(0x00FF, 0x0000, 0x0000); _ColorTable[13] = RGB(0x00FF, 0x0000, 0x00FF); _ColorTable[14] = RGB(0x00FF, 0x00FF, 0x0000); _ColorTable[15] = RGB(0x00FF, 0x00FF, 0x00FF); ``` As far as I can tell, that's "Vintage", which is pretty curious since I am sure we changed the color scheme at some earlier point. However, I can't find any mention of Campbell's black (ColorTable00) in the windows source tree as of 10.0.15063.
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

We announced Campbell on Aug 2, 2017 and mentioned a Windows build numbered 10.0.16257.

The scheme you extracted from the Creators' Update (10.0.15063) is certainly not the stock one!

@DHowett commented on GitHub (Sep 7, 2021): [We announced Campbell on Aug 2, 2017](https://devblogs.microsoft.com/commandline/updating-the-windows-console-colors/) and mentioned a Windows build numbered 10.0.16257. The scheme you extracted from the Creators' Update (10.0.15063) is certainly not the stock one!
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

I don't know how far back Windows build 10.0.15063 goes. Those are certainly Vintage.

If Campbell is from 2017, I'm pretty sure it pre-dates CreatorsUpdate. In 2017 I was still on Windows 7. :-)

My REG backup is from right after CreatorsUpdate (which came to me late); I didn't like the new colors and changed them back to Vintage. It's dated 2019-07-01. I also found the same thing by Googling creators update colortable00. In the same place there was

Windows 10 build 16257 got the new scheme.

Do you have an up-to-date (including CreatorsUpdate) Windows 10? What does HKCU\Console say?

@vefatica commented on GitHub (Sep 7, 2021): I don't know how far back Windows build 10.0.15063 goes. Those are certainly Vintage. If Campbell is from 2017, I'm pretty sure it pre-dates CreatorsUpdate. In 2017 I was still on Windows 7. :-) My REG backup is from right after CreatorsUpdate (which came to me late); I didn't like the new colors and changed them back to Vintage. It's dated 2019-07-01. I also found the same thing by Googling `creators update colortable00`. In the same place there was > Windows 10 build 16257 got the new scheme. Do you have an up-to-date (including CreatorsUpdate) Windows 10? What does HKCU\Console say?
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2021):

FWIW, Windows would try to port your reg entries on an upgrade, and we wouldn't blow them away to install the new defaults. So if you upgraded from 7 to 10 to CU, then you probably had Vintage migrated the whole way through.

@zadjii-msft commented on GitHub (Sep 7, 2021): FWIW, Windows would try to port your reg entries on an upgrade, and we wouldn't blow them away to install the new defaults. So if you upgraded from 7 to 10 to CU, then you probably had Vintage migrated the whole way through.
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

Do you have an up-to-date (including CreatorsUpdate) Windows 10? What does HKCU\Console say?

Sorry, I'm not sure what you mean. These are distinct versions of Windows, and being up-to-date while still being on the Creators' update will put you somewhere around 10.0.15063.9999. Moving off the Creators' update to a newer versions of Windows¹ will mean you're no longer on the Creators' Update.

The newest version of Windows 10 is 20H1 (10.0.19041.1) plus all of its servicing updates (which bring the build number to 10.0.19043.xxx). I definitely have one of those, and it definitely has Campbell as a color scheme.

A stock install of the Creators' Update, as released in October 2017, doesn't use Campbell. The door for getting feature updates into that version closed some time in June 2017, and Campbell was authored in early July 2017. 😄

I did find that result you're talking about by searching, and it seems like that blog post is explaining how to backport Campbell to an older version of Windows. Totally fine and good, just not evidence that Campbell existed for that version!

¹
image

@DHowett commented on GitHub (Sep 7, 2021): > Do you have an up-to-date (including CreatorsUpdate) Windows 10? What does HKCU\Console say? Sorry, I'm not sure what you mean. These are distinct versions of Windows, and being up-to-date while still being on the Creators' update will put you somewhere around 10.0.15063.9999. Moving off the Creators' update to a newer versions of Windows¹ will mean you're no longer on the Creators' Update. The newest version of Windows 10 is 20H1 (10.0.19041.1) plus all of its servicing updates (which bring the build number to 10.0.19043.xxx). I definitely have one of those, and it definitely has Campbell as a color scheme. A stock install of _the Creators' Update_, as released in October 2017, doesn't use Campbell. The door for getting feature updates into that version closed some time in June 2017, and Campbell was authored in early July 2017. :smile: I did find that result you're talking about by searching, and it seems like that blog post is explaining how to _backport_ Campbell to an older version of Windows. Totally fine and good, just not evidence that Campbell existed for that version! ¹ ![image](https://user-images.githubusercontent.com/189190/132379964-762027c0-db9d-458e-8943-be0589345021.png)
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

I'm getting lost. Those REG entries came from my registry in July 2019. Consulting records, that's when I got this computer, so they came installed. So maybe I shouldn't be talking about Creators Update. I also found those entries them here. I think I got a (pretty much) new OS in the Jan2021 20H2 update. That's as far back as my update history goes. Maybe this thread is going nowhere!

@vefatica commented on GitHub (Sep 7, 2021): I'm getting lost. Those REG entries came from my registry in July 2019. Consulting records, that's when I got this computer, so they came installed. So maybe I shouldn't be talking about Creators Update. I also found those entries them [here](https://winaero.com/new-colors-command-prompt-windows-10/). I think I got a (pretty much) new OS in the Jan2021 20H2 update. That's as far back as my update history goes. Maybe this thread is going nowhere!
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

Ah, I think I figured it out. If you installed in 2019, you've got Campbell. For sure.

What we're seeing here, though, is two translation issues!

First: the color ordering for console colors, as well as legacy VGA attributes (on which console colors are based) swaps red and blue (and derivatives like teal and cyan).

TRANSLATION ERROR ONE

                    1                   3         4                   6
          BLACK     RED       GREEN     YELLOW    BLUE      MAGENTA   TEAL      WHITE     GRAY      RED       GREEN     YELLOW    BLUE      MAGENTA   CYAN      WHITE         FORE      BACK
CAMPBELL {0x0C0C0C, 0x1F0FC5, 0x0EA113, 0x009CC1, 0xDA3700, 0x981788, 0xDD963A, 0xCCCCCC, 0x767676, 0x5648E7, 0x0CC616, 0xA5F1F9, 0xFF783B, 0x9E00B4, 0xD6D661, 0xF2F2F2,     0xCCCCCC, 0x0C0C0C},

          BLACK     **BLUE**  GREEN     **TEAL**  **RED**   MAGENTA   **YELLOW* WHITE     GRAY      **BLUE**  GREEN     **CYAN**  **RED**   MAGENTA   **YELLOW* WHITE         FORE      BACK
REGISTRY {0x0C0C0C, 0x0037DA, 0x13A10E, 0x3A96DD, 0xC50F1F, 0x881798, 0xC19C00, 0xCCCCCC, 0x767676, 0x3B78FF, 0x16C60C, 0x61D6D6, 0xE74856, 0xB4009E, 0xF9F1A5, 0xF2F2F2,     0xCCCCCC, 0x0C0C0C}

Translation error two is that the registry values are stored in 0BGR order, not 0RGB order.

In this example, I have lined up red and blue.

TRANSLATION ERROR TWO
ENDIAN SWAP

          ... 1         ... 4         
          ... RED       ... BLUE      
CAMPBELL {... 0x1F0FC5, ... 0xDA3700, }, 00BBGGRR
                 \ /           \ /
                 / \           / \
REGISTRY {... 0xC50F1F, ... 0x0037DA, }  00RRGGBB
@DHowett commented on GitHub (Sep 7, 2021): Ah, I think I figured it out. **If you installed in 2019, you've got Campbell. For sure.** What we're seeing here, though, is two translation issues! First: the color ordering for console colors, as well as legacy VGA attributes (on which console colors are based) _swaps red and blue_ (and derivatives like teal and cyan). ``` TRANSLATION ERROR ONE 1 3 4 6 BLACK RED GREEN YELLOW BLUE MAGENTA TEAL WHITE GRAY RED GREEN YELLOW BLUE MAGENTA CYAN WHITE FORE BACK CAMPBELL {0x0C0C0C, 0x1F0FC5, 0x0EA113, 0x009CC1, 0xDA3700, 0x981788, 0xDD963A, 0xCCCCCC, 0x767676, 0x5648E7, 0x0CC616, 0xA5F1F9, 0xFF783B, 0x9E00B4, 0xD6D661, 0xF2F2F2, 0xCCCCCC, 0x0C0C0C}, BLACK **BLUE** GREEN **TEAL** **RED** MAGENTA **YELLOW* WHITE GRAY **BLUE** GREEN **CYAN** **RED** MAGENTA **YELLOW* WHITE FORE BACK REGISTRY {0x0C0C0C, 0x0037DA, 0x13A10E, 0x3A96DD, 0xC50F1F, 0x881798, 0xC19C00, 0xCCCCCC, 0x767676, 0x3B78FF, 0x16C60C, 0x61D6D6, 0xE74856, 0xB4009E, 0xF9F1A5, 0xF2F2F2, 0xCCCCCC, 0x0C0C0C} ``` Translation error two is that the registry values are stored in `0BGR` order, not `0RGB` order. In this example, I have lined up red and blue. ``` TRANSLATION ERROR TWO ENDIAN SWAP ... 1 ... 4 ... RED ... BLUE CAMPBELL {... 0x1F0FC5, ... 0xDA3700, }, 00BBGGRR \ / \ / / \ / \ REGISTRY {... 0xC50F1F, ... 0x0037DA, } 00RRGGBB ```
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

Thanks! I know all about the red/blue swap and just plain failed to see that that's what was happening ... and that I didn't take that into consideration in making my C array initializer ... or, more likely, that I swapped them twice. Doh!

I'm sorry I wasted so much of your time on this.

@vefatica commented on GitHub (Sep 7, 2021): Thanks! I know all about the red/blue swap and just plain failed to see that that's what was happening ... and that I didn't take that into consideration in making my C array initializer ... or, more likely, that I swapped them twice. Doh! I'm sorry I wasted so much of your time on this.
Author
Owner

@DHowett commented on GitHub (Sep 7, 2021):

I'm sorry I wasted so much of your time on this.

You've probably guessed by now, but I love answering questions like this 🙂

@DHowett commented on GitHub (Sep 7, 2021): > I'm sorry I wasted so much of your time on this. You've probably guessed by now, but I love answering questions like this 🙂
Author
Owner

@vefatica commented on GitHub (Sep 7, 2021):

And thanks again to @zadjii-msft. My color scheme sampler is working well both in a console and in WT.

@vefatica commented on GitHub (Sep 7, 2021): And thanks again to @zadjii-msft. My color scheme sampler is working well both in a console and in WT.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15067