Incorrect color for white #10074

Closed
opened 2026-01-31 02:11:48 +00:00 by claunia · 3 comments
Owner

Originally created by @wawaforya on GitHub (Aug 8, 2020).

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Windows Terminal version (if applicable):
(Installed via Scoop, https://scoop.sh/)
Windows Terminal (Unpackaged)
Version: 1.1.200720001-release1.1

Any other software?
No.

Steps to reproduce

  1. Configure a color scheme as shown in the picture. Also refer to this gist for the details.
    Colorscheme

  2. Open a new PowerShell or PowerShell Core tab in Windows Terminal and run a script.

$esc = "$([char]27)"; for ($i = 30; $i -le 37; $i++) { Write-Host "$esc[${i}mNormal: (0;$i); $esc[${i};1mBright: (1;$i)" }

The color for Normal: (0;37); should be #a0a0a0 as configured, while it's displayed in black.
PowerShell
PowerShell Core

Or open a WSL tab (I use Arch Linux personally) and run a script.

for ((i = 30; i < 38; i++ )); do echo -e "\033[0;"$i"m Normal: (0;$i); \033[1;"$i"m Light: (1;$i)"; done

The color for Normal: (0;37); has the same issue as PowerShell.
WSL Arch

Expected behavior

The color for Normal: (0;37); should be displayed in #a0a0a0 as configured.

Actual behavior

The color for Normal: (0;37); is incorrect.

Originally created by @wawaforya on GitHub (Aug 8, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version (if applicable): (Installed via Scoop, https://scoop.sh/) Windows Terminal (Unpackaged) Version: 1.1.200720001-release1.1 Any other software? No. ``` # Steps to reproduce 1. Configure a color scheme as shown in the picture. Also refer to [this gist](https://gist.github.com/wawaforya/0c2de893d91730421c0e572843b7e9cf) for the details. ![Colorscheme](https://user-images.githubusercontent.com/19285014/89710760-4c90f680-d9b8-11ea-8aea-34a9024ef9ac.png) 2. Open a new PowerShell or PowerShell Core tab in Windows Terminal and run a script. ```powershell $esc = "$([char]27)"; for ($i = 30; $i -le 37; $i++) { Write-Host "$esc[${i}mNormal: (0;$i); $esc[${i};1mBright: (1;$i)" } ``` The color for `Normal: (0;37);` should be #a0a0a0 as configured, while it's displayed in black. ![PowerShell](https://user-images.githubusercontent.com/19285014/89711016-37b56280-d9ba-11ea-8930-d0ae71c5688f.png) ![PowerShell Core](https://user-images.githubusercontent.com/19285014/89711021-3b48e980-d9ba-11ea-82d8-63345b80d58d.png) Or open a WSL tab (I use Arch Linux personally) and run a script. ```bash for ((i = 30; i < 38; i++ )); do echo -e "\033[0;"$i"m Normal: (0;$i); \033[1;"$i"m Light: (1;$i)"; done ``` The color for `Normal: (0;37);` has the same issue as PowerShell. ![WSL Arch](https://user-images.githubusercontent.com/19285014/89711024-3d12ad00-d9ba-11ea-8d65-8e1b65e2bdf7.png) <!-- A description of how to trigger this bug. --> # Expected behavior The color for `Normal: (0;37);` should be displayed in #a0a0a0 as configured. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior The color for `Normal: (0;37);` is incorrect. <!-- What's actually happening? -->
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 02:11:48 +00:00
Author
Owner

@j4james commented on GitHub (Aug 8, 2020):

Considering the version number you're on, this is probably a symptom of issue #2661, which was fixed in v1.2.2022.0. That said, upgrading isn't really going to help, because we still have a color compatibility hack in place for PowerShell (PR #6810) that retains that incorrect color, because fixing it makes things worse. If you're using the cmd shell or a WSL shell, though, the colors should be correct in the latest preview version of WT.

@j4james commented on GitHub (Aug 8, 2020): Considering the version number you're on, this is probably a symptom of issue #2661, which was fixed in v1.2.2022.0. That said, upgrading isn't really going to help, because we still have a color compatibility hack in place for PowerShell (PR #6810) that retains that incorrect color, because fixing it makes things worse. If you're using the cmd shell or a WSL shell, though, the colors should be correct in the latest preview version of WT.
Author
Owner

@j4james commented on GitHub (Aug 8, 2020):

For reference, here's what your WSL test case looks like in the latest version:
image

@j4james commented on GitHub (Aug 8, 2020): For reference, here's what your WSL test case looks like in the latest version: ![image](https://user-images.githubusercontent.com/4181424/89715150-ccf52e80-d99b-11ea-973d-ce52fa6698dd.png)
Author
Owner

@wawaforya commented on GitHub (Aug 8, 2020):

@j4james, thanks you very much. Just installed the latest preview version and it works fine in WSL now.

@wawaforya commented on GitHub (Aug 8, 2020): @j4james, thanks you very much. Just installed the latest preview version and it works fine in WSL now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10074