[bug] cannot save background color #13

Closed
opened 2026-01-30 21:39:39 +00:00 by claunia · 5 comments
Owner

Originally created by @khuongduybui on GitHub (Aug 14, 2017).

I know this is probably larger than the scope of this tool, but a bug is a bug is a bug is a bug.

When I use colortool with an iterm2color file, it correctly applies the background color to the console, but that color isn't saved anywhere.

Furthermore, when I manually override the iterm2color file to assign the background color to ColorTable00, it is overridden to Black (0, 0, 0) as soon as I open the Properties dialog.

I currently have to save it to defaults, then go to regedit and manually copy the key over, which is a pain.

Originally created by @khuongduybui on GitHub (Aug 14, 2017). I know this is probably larger than the scope of this tool, but a bug is a bug is a bug is a bug. When I use colortool with an iterm2color file, it correctly applies the background color to the console, but that color isn't saved anywhere. Furthermore, when I manually override the iterm2color file to assign the background color to ColorTable00, it is overridden to Black (0, 0, 0) as soon as I open the Properties dialog. I currently have to save it to defaults, then go to regedit and manually copy the key over, which is a pain.
claunia added the Product-ConhostResolution-Fix-Available labels 2026-01-30 21:39:39 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 14, 2017):

@khuongduybui can i get a copy of the .itermcolor scheme you're using? I saw this once before but couldn't get it to repro.

@zadjii-msft commented on GitHub (Aug 14, 2017): @khuongduybui can i get a copy of the .itermcolor scheme you're using? I saw this once before but couldn't get it to repro.
Author
Owner

@zadjii-msft commented on GitHub (Aug 14, 2017):

Also @paulcam206 wasn't there a bug in the property sheet that was related to this?

I found this sitting in a prototyping branch that never got merged, sounds a lot like this issue....

Fix a bug where the ColorTable00 would be 0,0,0

  Sometimes the PropSheet would send an EN_CHANGE before the colors page was fully initialized.
  This would cause the colors page to use the current values of the dialog boxes (0,0,0) to update the selected color.

I think this is actually a conhost bug.

@zadjii-msft commented on GitHub (Aug 14, 2017): Also @paulcam206 wasn't there a bug in the property sheet that was related to this? I found this sitting in a prototyping branch that never got merged, sounds a lot like this issue.... ``` Fix a bug where the ColorTable00 would be 0,0,0 Sometimes the PropSheet would send an EN_CHANGE before the colors page was fully initialized. This would cause the colors page to use the current values of the dialog boxes (0,0,0) to update the selected color. ``` I think this is actually a conhost bug.
Author
Owner

@khuongduybui commented on GitHub (Aug 14, 2017):

I might have reported 2 issues here:

  1. When the iterm2color file contains the background color not included in the 16 defined colors. colortool still correctly sets the background, it I guess there're nowhere I can save that value to...
    My current workaround for this is to override ColorTable00 with the background color.
    There are a lot of schemes like that but if you want a specific one, try https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Solarized%20Dark%20Higher%20Contrast.itermcolors

  2. The bug "where the ColorTable00 would be 0,0,0" as @zadjii-msft listed.
    My current workaround for this is to write to defaults, which gets written to Registry, then get it there.

@khuongduybui commented on GitHub (Aug 14, 2017): I might have reported 2 issues here: 1. When the `iterm2color` file contains the background color not included in the 16 defined colors. `colortool` still correctly sets the background, it I guess there're nowhere I can save that value to... My current workaround for this is to override ColorTable00 with the background color. There are a lot of schemes like that but if you want a specific one, try https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Solarized%20Dark%20Higher%20Contrast.itermcolors 2. The bug "where the ColorTable00 would be 0,0,0" as @zadjii-msft listed. My current workaround for this is to write to defaults, which gets written to Registry, then get it there.
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2017):

Ah, okay yea. The second part is the one that I might have a fix for. The first one is... more complicated.
To copy from a comment in a mail thread:

Now, as far as why there’s 20 colors vs our 16. The reason why the screenshots on https://github.com/mbadolato/iTerm2-Color-Schemes won’t match up exactly with our output is because Linux terminals (including PuTTY, iTerm2, gnome-terminal, even conemu really) have a SEPARATE “Default” foreground and background, while conhost uses an index from the table as our “Default”. They also have a separate “Bold/Bright” version of the default FG and BG, for an extra 4 colors, 20 total.

I haven’t taken a super close look at it, but if I had to guess, I’d think that adding support for additional separate “Default” colors (unique from the table) would probably require as much work as went into supporting full RGB sequences in the first place, as well as a UI change to the property sheet. Not that it wouldn’t be welcome, but it would be a lot of work.

@zadjii-msft commented on GitHub (Aug 15, 2017): Ah, okay yea. The second part is the one that I might have a fix for. The first one is... more complicated. To copy from a comment in a mail thread: Now, as far as why there’s 20 colors vs our 16. The reason why the screenshots on https://github.com/mbadolato/iTerm2-Color-Schemes won’t match up exactly with our output is because Linux terminals (including PuTTY, iTerm2, gnome-terminal, even conemu really) have a SEPARATE “Default” foreground and background, while conhost uses an index from the table as our “Default”. They also have a separate “Bold/Bright” version of the default FG and BG, for an extra 4 colors, 20 total. I haven’t taken a super close look at it, but if I had to guess, I’d think that adding support for additional separate “Default” colors (unique from the table) would probably require as much work as went into supporting full RGB sequences in the first place, as well as a UI change to the property sheet. Not that it wouldn’t be welcome, but it would be a lot of work.
Author
Owner

@zadjii-msft commented on GitHub (Oct 15, 2018):

I was keeping this open for the first part of the issue, with the 0, 0, 0 bug, but I'm not seeing it anymore. Presumably the fix I had mentioned on Aug 14 was in fact the fix for this. I'm going to resolve this issue.

@zadjii-msft commented on GitHub (Oct 15, 2018): I was keeping this open for the first part of the issue, with the 0, 0, 0 bug, but I'm not seeing it anymore. Presumably the fix I had mentioned on Aug 14 was in fact the fix for this. I'm going to resolve this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13