Numbers are invisible with some themes in PowerShell #16252

Closed
opened 2026-01-31 05:01:47 +00:00 by claunia · 4 comments
Owner

Originally created by @IvanRenison on GitHub (Dec 23, 2021).

If I type in PowerShell with windows terminal:

PS C:\> 2+3

With the theme One Half Light or Solarized Light the numbers seem to be the same colour as the background.
Here some examples:

With One Half Light:
image

With Solarized Light:
image

Also, with Tango Light is almost invisible:
image

And here is with Campbell Powershell for reference:
image

I suppose that what is happening is that these theme's have de colour that PowerShell uses for numbers as the same colour than the background.

I have windows terminal version 1.11.2921.0, windows build number 10.0.19042.0, and I have not changed the colors of the themes.

Originally created by @IvanRenison on GitHub (Dec 23, 2021). If I type in PowerShell with windows terminal: ``` PS C:\> 2+3 ``` With the theme `One Half Light` or `Solarized Light` the numbers seem to be the same colour as the background. Here some examples: With `One Half Light`: ![image](https://user-images.githubusercontent.com/85908989/147286323-003deed8-f428-490d-9f59-18d0afd950ca.png) With `Solarized Light`: ![image](https://user-images.githubusercontent.com/85908989/147286346-a7f1418e-9aad-4a43-bb39-e3c90701b870.png) Also, with `Tango Light` is almost invisible: ![image](https://user-images.githubusercontent.com/85908989/147286488-3feda044-2538-4ac7-8932-043d7df6f4c3.png) And here is with `Campbell Powershell` for reference: ![image](https://user-images.githubusercontent.com/85908989/147286553-511ab21a-fe3c-4a55-84dc-9dc3363c0077.png) I suppose that what is happening is that these theme's have de colour that PowerShell uses for numbers as the same colour than the background. I have windows terminal version `1.11.2921.0`, windows build number `10.0.19042.0`, and I have not changed the colors of the themes.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 05:01:47 +00:00
Author
Owner

@237dmitry commented on GitHub (Dec 23, 2021):

I think this is PSReadline settings. Try:

Set-PSReadLineOption -Colors @{ 'Number' = "`e[1;30m" }             # PowerShell Core
Set-PSReadLineOption -Colors @{ 'Number' = "$([char]27)[1;30m"  }   # Windows PowerShell
@237dmitry commented on GitHub (Dec 23, 2021): I think this is PSReadline settings. Try: ``` Set-PSReadLineOption -Colors @{ 'Number' = "`e[1;30m" } # PowerShell Core Set-PSReadLineOption -Colors @{ 'Number' = "$([char]27)[1;30m" } # Windows PowerShell ```
Author
Owner

@j4james commented on GitHub (Dec 23, 2021):

If you're willing to use the Windows Terminal preview build, there is an option on the profile appearance tab, "Automatically adjust lightness of indistinguishable text", which does a reasonable job of fixing broken color schemes like this.

@j4james commented on GitHub (Dec 23, 2021): If you're willing to use the Windows Terminal preview build, there is an option on the profile appearance tab, "Automatically adjust lightness of indistinguishable text", which does a reasonable job of fixing broken color schemes like this.
Author
Owner

@IvanRenison commented on GitHub (Dec 23, 2021):

I think this is PSReadline settings. Try:

Set-PSReadLineOption -Colors @{ 'Number' = "`e[1;30m" }             # PowerShell Core
Set-PSReadLineOption -Colors @{ 'Number' = "$([char]27)[1;30m"  }   # Windows PowerShell

That worked, thank you

Good to know than for future versions there will be a better solution

@IvanRenison commented on GitHub (Dec 23, 2021): > I think this is PSReadline settings. Try: > > ``` > Set-PSReadLineOption -Colors @{ 'Number' = "`e[1;30m" } # PowerShell Core > Set-PSReadLineOption -Colors @{ 'Number' = "$([char]27)[1;30m" } # Windows PowerShell > ``` That worked, thank you Good to know than for future versions there will be a better solution
Author
Owner

@cloudbaseaws commented on GitHub (Jul 2, 2024):

Worked!

@cloudbaseaws commented on GitHub (Jul 2, 2024): Worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16252