[illusion] The color name in profiles.json does not match the actual color #1156

Closed
opened 2026-01-30 22:17:44 +00:00 by claunia · 5 comments
Owner

Originally created by @SwimmingTiger on GitHub (May 16, 2019).

In conclusion:

To confirm the following issue, I installed Ubuntu and ran my script and get the same color output as Windows Terminal.

It seems that I am completely wrong. What I have always obtained through cmd-colors-solarized is not the real Solarized Dark.


Your Windows build number

Windows 10 version 1903 build 18895.1000

What you're doing and what's happening

I have always used the solarized dark scheme provided by cmd-colors-solarized in system ConHost and it works well.

I want to port this scheme to Windows Terminal, so I have this in profiles.json (It is only a small difference from the Solarized Dark scheme that comes with the project):

{
    "name": "Solarized Dark CMD",
    "foreground": "#839496",
    "background": "#002B36",
    "black": "#073642",
    "red": "#DC322F",
    "green": "#859900",
    "yellow": "#B58900",
    "blue": "#268BD2",
    "purple": "#D33682",
    "cyan": "#2AA198",
    "white": "#EEE8D5",
    "brightBlack": "#002B36",
    "brightRed": "#CB4B16",
    "brightGreen": "#586E75",
    "brightYellow": "#657B83",
    "brightBlue": "#839496",
    "brightPurple": "#6C71C4",
    "brightCyan": "#93A1A1",
    "brightWhite": "#FDF6E3"
}

However, I got a completely different color than expected. The same color scheme works quite well in Windows Console (Preview) (importing via solarized-dark.reg).

The following script can show the difference between the two:

#!/bin/bash

# solarized ansicolors (exporting for grins)
export base03='\033[0;30;40m'
export base02='\033[1;30;40m'
export base01='\033[0;32;40m'
export base00='\033[0;33;40m'
export base0='\033[0;34;40m'
export base1='\033[0;36;40m'
export base2='\033[0;37;40m'
export base3='\033[1;37;40m'
export yellow='\033[1;33;40m'
export orange='\033[0;31;40m'
export red='\033[1;31;40m'
export magenta='\033[1;35;40m'
export violet='\033[0;35;40m'
export blue='\033[1;34;40m'
export cyan='\033[1;36;40m'
export green='\033[1;32;40m'
export reset='\033[0m'

colors () {
  echo -e "base03  ${base03}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base02  ${base02}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base01  ${base01}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base00  ${base00}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base0   ${base0}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base1   ${base1}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base2   ${base2}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "base3   ${base3}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "yellow  ${yellow}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "orange  ${orange}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "red     ${red}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "magenta ${magenta}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "violet  ${violet}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "blue    ${blue}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "cyan    ${cyan}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
  echo -e "green   ${green}Test ▅▅▅▅▅▅▅▅▅▅▅$reset"
}

colors

before fix

What's wrong / what should be happening instead:

I got the following form through a color picker:

name Expected color Windows Terminal
(Actual color)
Windows Console
(Actual color)
base03 #002B36 (brightBlack) #073642 (black) #002B36 (brightBlack)
base02 #073642 (black) #002B36 (brightBlack) #073642 (black)
base01 #586E75 (brightGreen) #859900 (green) #586E75 (brightGreen)
base00 #657B83 (brightYellow) #B58900 (yellow) #657B83 (brightYellow)
base0 #839496 (brightBlue) #268BD2 (blue) #839496 (brightBlue)
base1 #93A1A1 (brightCyan) #2AA198 (cyan) #93A1A1 (brightCyan)
base2 #EEE8D5 (white) #839496 (brightBlue) #EEE8D5 (white)
base3 #FDF6E3 (brightWhite) #FDF6E3 (brightWhite) #FDF6E3 (brightWhite)
yellow #B58900 (yellow) #657B83 (brightYellow) #B58900 (yellow)
orange #CB4B16 (brightRed) #DC322F (red) #CB4B16 (brightRed)
red #DC322F (red) #CB4B16 (brightRed) #DC322F (red)
magenta #D33682 (purple) #6C71C4 (brightPurple) #D33682 (purple)
violet #6C71C4 (brightPurple) #D33682 (purple) #6C71C4 (brightPurple)
blue #268BD2 (blue) #839496 (brightBlue) #268BD2 (blue)
cyan #2AA198 (cyan) #93A1A1 (brightCyan) #2AA198 (cyan)
green #859900 (green) #586E75 (brightGreen) #859900 (green)

So you can see two problems:

  1. Windows Terminal's understanding of ANSI escape sequences is different from ConHost. The colors and their bright colors are reversed in Windows Terminal.
  2. base2='\033[0;37;40m' and blue='\033[1;34;40m' have the same actual color in Windows Terminal, one should be wrong. There are no identical colors in the scheme.

Based on issue 1, I made the following fix (Exchange colors with their bright colors):

{
    "name": "Solarized Dark CMD Fix",
    "foreground": "#839496",
    "background": "#002B36",
    "black": "#002B36",
    "red": "#CB4B16",
    "green": "#586E75",
    "yellow": "#657B83",
    "blue": "#839496",
    "purple": "#6C71C4",
    "cyan": "#93A1A1",
    "white": "#EEE8D5",
    "brightBlack": "#073642",
    "brightRed": "#DC322F",
    "brightGreen": "#859900",
    "brightYellow": "#B58900",
    "brightBlue": "#268BD2",
    "brightPurple": "#D33682",
    "brightCyan": "#2AA198",
    "brightWhite": "#FDF6E3"
}

However, I can't fix the base2 because it uses the same color as another VT (it looks like same as base0 at this time):

after fix

Originally created by @SwimmingTiger on GitHub (May 16, 2019). In conclusion: To confirm the following issue, I installed Ubuntu and ran my script and get the same color output as `Windows Terminal`. It seems that I am completely wrong. What I have always obtained through [cmd-colors-solarized](https://github.com/neilpa/cmd-colors-solarized) is not the real `Solarized Dark`. ---------------------------------------------------------- ## Your Windows build number Windows 10 version 1903 build 18895.1000 ## What you're doing and what's happening I have always used the solarized dark scheme provided by [cmd-colors-solarized](https://github.com/neilpa/cmd-colors-solarized) in system ConHost and it works well. I want to port this scheme to Windows Terminal, so I have this in `profiles.json` (It is only a small difference from the `Solarized Dark` scheme that comes with the project): ```json { "name": "Solarized Dark CMD", "foreground": "#839496", "background": "#002B36", "black": "#073642", "red": "#DC322F", "green": "#859900", "yellow": "#B58900", "blue": "#268BD2", "purple": "#D33682", "cyan": "#2AA198", "white": "#EEE8D5", "brightBlack": "#002B36", "brightRed": "#CB4B16", "brightGreen": "#586E75", "brightYellow": "#657B83", "brightBlue": "#839496", "brightPurple": "#6C71C4", "brightCyan": "#93A1A1", "brightWhite": "#FDF6E3" } ``` However, I got a completely different color than expected. The same color scheme works quite well in `Windows Console (Preview)` (importing via [solarized-dark.reg](https://github.com/neilpa/cmd-colors-solarized/blob/master/solarized-dark.reg)). The following script can show the difference between the two: ```bash #!/bin/bash # solarized ansicolors (exporting for grins) export base03='\033[0;30;40m' export base02='\033[1;30;40m' export base01='\033[0;32;40m' export base00='\033[0;33;40m' export base0='\033[0;34;40m' export base1='\033[0;36;40m' export base2='\033[0;37;40m' export base3='\033[1;37;40m' export yellow='\033[1;33;40m' export orange='\033[0;31;40m' export red='\033[1;31;40m' export magenta='\033[1;35;40m' export violet='\033[0;35;40m' export blue='\033[1;34;40m' export cyan='\033[1;36;40m' export green='\033[1;32;40m' export reset='\033[0m' colors () { echo -e "base03 ${base03}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base02 ${base02}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base01 ${base01}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base00 ${base00}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base0 ${base0}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base1 ${base1}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base2 ${base2}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "base3 ${base3}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "yellow ${yellow}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "orange ${orange}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "red ${red}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "magenta ${magenta}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "violet ${violet}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "blue ${blue}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "cyan ${cyan}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" echo -e "green ${green}Test ▅▅▅▅▅▅▅▅▅▅▅$reset" } colors ``` ![before fix](https://user-images.githubusercontent.com/4986069/57858495-c1ac6500-7823-11e9-824b-d5c62450ce00.png) ## What's wrong / what should be happening instead: I got the following form through a color picker: name | Expected color | Windows Terminal<br>(Actual color) | Windows Console<br>(Actual color) --------|------------------------|------------------------|----------------------- base03 | #002B36 (brightBlack) | #073642 (black) | #002B36 (brightBlack) base02 | #073642 (black) | #002B36 (brightBlack) | #073642 (black) base01 | #586E75 (brightGreen) | #859900 (green) | #586E75 (brightGreen) base00 | #657B83 (brightYellow) | #B58900 (yellow) | #657B83 (brightYellow) base0 | #839496 (brightBlue) | #268BD2 (blue) | #839496 (brightBlue) base1 | #93A1A1 (brightCyan) | #2AA198 (cyan) | #93A1A1 (brightCyan) base2 | #EEE8D5 (white) | #839496 (brightBlue) | #EEE8D5 (white) base3 | #FDF6E3 (brightWhite) | #FDF6E3 (brightWhite) | #FDF6E3 (brightWhite) yellow | #B58900 (yellow) | #657B83 (brightYellow) | #B58900 (yellow) orange | #CB4B16 (brightRed) | #DC322F (red) | #CB4B16 (brightRed) red | #DC322F (red) | #CB4B16 (brightRed) | #DC322F (red) magenta | #D33682 (purple) | #6C71C4 (brightPurple) | #D33682 (purple) violet | #6C71C4 (brightPurple) | #D33682 (purple) | #6C71C4 (brightPurple) blue | #268BD2 (blue) | #839496 (brightBlue) | #268BD2 (blue) cyan | #2AA198 (cyan) | #93A1A1 (brightCyan) | #2AA198 (cyan) green | #859900 (green) | #586E75 (brightGreen) | #859900 (green) So you can see two problems: 1. Windows Terminal's understanding of ANSI escape sequences is different from ConHost. The colors and their bright colors are reversed in `Windows Terminal`. 2. `base2='\033[0;37;40m'` and `blue='\033[1;34;40m'` have the same actual color in `Windows Terminal`, one should be wrong. There are no identical colors in the scheme. Based on issue 1, I made the following fix (Exchange colors with their bright colors): ```json { "name": "Solarized Dark CMD Fix", "foreground": "#839496", "background": "#002B36", "black": "#002B36", "red": "#CB4B16", "green": "#586E75", "yellow": "#657B83", "blue": "#839496", "purple": "#6C71C4", "cyan": "#93A1A1", "white": "#EEE8D5", "brightBlack": "#073642", "brightRed": "#DC322F", "brightGreen": "#859900", "brightYellow": "#B58900", "brightBlue": "#268BD2", "brightPurple": "#D33682", "brightCyan": "#2AA198", "brightWhite": "#FDF6E3" } ``` However, I can't fix the `base2` because it uses the same color as another VT (it looks like same as `base0` at this time): ![after fix](https://user-images.githubusercontent.com/4986069/57859192-0e447000-7825-11e9-89c9-b0341f7f6b37.png)
claunia added the Issue-Question label 2026-01-30 22:17:44 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2019):

Out of curiosity, why aren't you using the Solarized Dark theme that ships with the Windows Terminal by default?
image

Looking at it closer, it looks like the scheme you've linked puts most of the actual colors in the bright section of the table (the 8-15th colors), as opposed to the dark section of the table (the 0-7th colors).

@zadjii-msft commented on GitHub (May 16, 2019): Out of curiosity, why aren't you using the Solarized Dark theme that ships with the Windows Terminal by default? ![image](https://user-images.githubusercontent.com/18356694/57862676-5e3c1c00-77be-11e9-9e0d-b32598cf08ca.png) Looking at it closer, it looks like the scheme you've linked puts most of the actual colors in the _bright_ section of the table (the 8-15th colors), as opposed to the dark section of the table (the 0-7th colors).
Author
Owner

@SwimmingTiger commented on GitHub (May 16, 2019):

@zadjii-msft Solarized Dark CMD and the origin Solarized Dark that comes with profiles.json are only different in foreground, background and red, you can think of them as consistent.

批注 2019-05-16 225302

But I got a very bad display in Windows Terminal with its origin Solarized Dark:

批注 2019-05-16 225702

So I wrote Solarized Dark CMD Fix, which looks better and looks like Solarized Dark in other terminal:

批注 2019-05-16 225938

@SwimmingTiger commented on GitHub (May 16, 2019): @zadjii-msft `Solarized Dark CMD` and the origin `Solarized Dark` that comes with `profiles.json` are only different in foreground, background and red, you can think of them as consistent. ![批注 2019-05-16 225302](https://user-images.githubusercontent.com/4986069/57863858-64b5ac80-782d-11e9-8ff0-26c8fae064ae.png) But I got a very bad display in `Windows Terminal` with its origin `Solarized Dark`: ![批注 2019-05-16 225702](https://user-images.githubusercontent.com/4986069/57864132-f1f90100-782d-11e9-98da-ebe081c82207.png) So I wrote `Solarized Dark CMD Fix`, which looks better and looks like Solarized Dark in other terminal: ![批注 2019-05-16 225938](https://user-images.githubusercontent.com/4986069/57864367-54ea9800-782e-11e9-909e-c606e08e6a97.png)
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2019):

I mean frankly, this is a Solarized problem. It only really has like 8 terminal colors, the rest are all grey-scale. That means that no matter how you order the solarized colors, there are going to be a bunch of colors that don't really work great.

@zadjii-msft commented on GitHub (May 16, 2019): I mean frankly, this is a Solarized problem. It only really has like 8 terminal colors, the rest are all grey-scale. That means that no matter how you order the solarized colors, there are going to be a bunch of colors that don't really work great.
Author
Owner

@SwimmingTiger commented on GitHub (May 16, 2019):

@zadjii-msft I think you misunderstood the problem I want to reflect. What I want to say is that when I set the theme to "Solarized Dark", it looks completely different from "Solarized Dark" on other terminals. Some colors that should be A are turned into B, so the effect is very bad.

I have updated my color table to avoid being misunderstood. You can now see the "Expected color" and the "Actual color" on the Windows Terminal.

@SwimmingTiger commented on GitHub (May 16, 2019): @zadjii-msft I think you misunderstood the problem I want to reflect. What I want to say is that when I set the theme to "Solarized Dark", it looks completely different from "Solarized Dark" on other terminals. Some colors that should be A are turned into B, so the effect is very bad. I have updated my color table to avoid being misunderstood. You can now see the "Expected color" and the "Actual color" on the `Windows Terminal`.
Author
Owner

@SwimmingTiger commented on GitHub (May 16, 2019):

To confirm this, I installed Ubuntu and ran my script and get the same color output as Windows Terminal.

It seems that I am completely wrong. What I have always obtained through cmd-colors-solarized is not the real Solarized Dark.

批注 2019-05-16 234348

So only this the real issue:

base2='\033[0;37;40m' and blue='\033[1;34;40m' have the same actual color in Windows Terminal, one should be wrong. There are no identical colors in the scheme.

@SwimmingTiger commented on GitHub (May 16, 2019): To confirm this, I installed Ubuntu and ran my script and get the same color output as `Windows Terminal`. It seems that I am completely wrong. What I have always obtained through [cmd-colors-solarized](https://github.com/neilpa/cmd-colors-solarized) is not the real `Solarized Dark`. ![批注 2019-05-16 234348](https://user-images.githubusercontent.com/4986069/57867884-81091780-7834-11e9-9693-54c59ce25eb2.png) So only this the real issue: > `base2='\033[0;37;40m'` and `blue='\033[1;34;40m'` have the same actual color in `Windows Terminal`, one should be wrong. There are no identical colors in the scheme.
Sign in to join this conversation.
No Label Issue-Question
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1156