Potential regression with ScreenColors #391

Open
opened 2026-01-30 21:50:45 +00:00 by claunia · 0 comments
Owner

Originally created by @andyleejordan on GitHub (Oct 2, 2018).

  • Your Windows build number: Windows Version 1803 OS Build 17134.228

  • What you're doing and what's happening:

Attempting to set background and foreground colors through the registry keys, as detailed here.

  • What's wrong / what should be happening instead: (Quoting from other issue:)

After experimenting, I think there is currently a regression. ScreenColors is supposed to be of the form 0008 0009 where the first two bytes are the background color and the last two bytes are the text color. This is what we previously documented (in the theme), and indeed, it's how PopupColors is still behaving.

However, it appears that the last byte of ScreenColors is being read for the colors, instead of two pairs of two bytes. That is, what I've set is being interpreted as 09 ending up as base02 (color 0) and base00 (color 9). If I edit the default value in the GUI of cmd.exe to use base03 and base00 (colors 8 and 9), and save this, the registry key ScreenColors is then saved as 0000 0089.

So instead of the first two bytes being the background color, it appears to me that a console regression is instead reading only the last byte as the background color.

See PR to Solarized theme for console here: https://github.com/neilpa/cmd-colors-solarized/pull/35
/cc @bitcrazed

Originally created by @andyleejordan on GitHub (Oct 2, 2018). * Your Windows build number: Windows Version 1803 OS Build 17134.228 * What you're doing and what's happening: Attempting to set background and foreground colors through the registry keys, as [detailed here](https://github.com/neilpa/cmd-colors-solarized/pull/35#issuecomment-415555366). * What's wrong / what should be happening instead: (Quoting from other issue:) After experimenting, I think there is _currently_ a regression. `ScreenColors` is supposed to be of the form `0008 0009` where the first two bytes are the background color and the last two bytes are the text color. This is what we previously documented (in the theme), and indeed, it's how `PopupColors` is _still_ behaving. However, it appears that the last byte of `ScreenColors` is being read for the colors, instead of two pairs of two bytes. That is, what I've set is being interpreted as `09` ending up as `base02` (color 0) and `base00` (color 9). If I edit the default value in the GUI of cmd.exe to use `base03` and `base00` (colors 8 and 9), and save this, the registry key `ScreenColors` is then saved as `0000 0089`. So instead of the first two bytes being the background color, it appears to me that a console regression is instead reading only the last byte as the background color. See PR to Solarized theme for console here: https://github.com/neilpa/cmd-colors-solarized/pull/35 /cc @bitcrazed
claunia added the Product-ConhostIssue-Question labels 2026-01-30 21:50:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#391