Bright foreground color hard-coded to be brightWhite, bold text invisible for light color schemes #5303

Closed
opened 2026-01-31 00:10:06 +00:00 by claunia · 3 comments
Owner

Originally created by @roblillack on GitHub (Nov 29, 2019).

Environment

Windows build number: Microsoft Windows NT 10.0.18363.0
Windows Terminal version (if applicable): 0.7.3291.0

Steps to reproduce

  1. Select light color scheme (dark foreground color on very light background color)
  2. Try to display bright text (ANSI escape code [1m) without specifying a non-default color, for example by running this in a WSL shell:
echo "this is $(tput bold)normal bright text$(tput sgr0) and this is $(tput setaf 1)$(tput bold)red bright text$(tput sgr0)."

Expected behavior

The words "normal bright text" should be visible (and, preferably, highlighted in some way or bold).

Actual behavior

Windows Terminal selects "bright white" as the default "bright foreground" color which in this case is the same as the background color. Also, compare it to the behavior of ConEmu below, that works:

image

Suggestion

There are multiple ways to solve this problem (which are separate from implementing bold support as discussed in #109):

  1. Add an option brightForeground to the color schemes so light schemes can set it to a dark color, or
  2. Add an option to ignore the [1m escape sequences altogether, or
  3. Implement a better algorithm that does not hardcode using "bright white" but chooses a fitting color from the palette based on the perceived "darkness" of the background color (say, go with "bright black" for light backgrounds, "bright white" for dark backgrounds)

I strongly suggest to go with option no. 1.

Originally created by @roblillack on GitHub (Nov 29, 2019). # Environment ```none Windows build number: Microsoft Windows NT 10.0.18363.0 Windows Terminal version (if applicable): 0.7.3291.0 ``` # Steps to reproduce 1. Select light color scheme (dark foreground color on very light background color) 2. Try to display _bright_ text (ANSI escape code `[1m`) without specifying a non-default color, for example by running this in a WSL shell: ``` echo "this is $(tput bold)normal bright text$(tput sgr0) and this is $(tput setaf 1)$(tput bold)red bright text$(tput sgr0)." ``` # Expected behavior The words "normal bright text" should be visible (and, preferably, highlighted in some way or bold). # Actual behavior Windows Terminal selects "bright white" as the default "bright foreground" color which in this case is the same as the background color. Also, compare it to the behavior of ConEmu below, that works: ![image](https://user-images.githubusercontent.com/37167/69890823-4b231080-12f8-11ea-853a-858e48d887aa.png) # Suggestion There are multiple ways to solve this problem (which are separate from implementing bold support as discussed in #109): 1. Add an option `brightForeground` to the color schemes so light schemes can set it to a dark color, _or_ 2. Add an option to ignore the `[1m` escape sequences altogether, _or_ 3. Implement a better algorithm that does not hardcode using "bright white" but chooses a fitting color from the palette based on the perceived "darkness" of the background color (say, go with "bright black" for light backgrounds, "bright white" for dark backgrounds) I strongly suggest to go with option no. 1.
claunia added the Resolution-Duplicate label 2026-01-31 00:10:06 +00:00
Author
Owner

@j4james commented on GitHub (Nov 29, 2019):

This sounds the same as #3022, which was resolved as a duplicate of #2661 and #293.

@j4james commented on GitHub (Nov 29, 2019): This sounds the same as #3022, which was resolved as a duplicate of #2661 and #293.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 30, 2019):

Yep, this is a /dupe of #2661 and #293. Thanks!

@DHowett-MSFT commented on GitHub (Nov 30, 2019): Yep, this is a /dupe of #2661 and #293. Thanks!
Author
Owner

@ghost commented on GitHub (Nov 30, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Nov 30, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5303