Write-Host -ForegroundColor Gray Shows Whatever The Supplied Foreground Color in Scheme is #9590
Labels
Resolution-Duplicate
There's another issue on the tracker that's pretty much the same thing.
Windows Terminal version (or Windows build number)
1.6.105671.0
Other Software
PS 7.1.3
Steps to reproduce
Write-Host "Hello world!" -ForegroundColor DarkGray
Write-Host "Hello world!" -ForegroundColor Gray
Write-Host "Hello world!" -ForegroundColor White
Expected Behavior
Write-Host -ForegroundColor Gray "Hello world!" returns a string formatting using the Gray (White or BrightBlack?) color as defined in the console.
Actual Behavior
Strings formatted with -ForegroundColor Gray are whatever the console's Foreground color is defined as, in the color scheme JSON of the WT theme.
When using Write-Host with -ForegroundColor Gray, Windows Terminal uses the Foreground key from the Color Theme's JSON to determine the color, instead of the White key.
Here is a screenshot with the defaults as the theme

Here is a screenshot with the foreground key turned off

Here is a screenshot using White as the foreground key

Here is a screenshot using Red as the foreground key

Here is a screenshot using Cyan as the brightBlack key

Here's a screenshot with the foreground key turned off, and the Powershell console's foreground set to white.
Finally, here's a screenshot with the foreground key set to Red, and the Powershell console's foreground set to white.

The text was updated successfully, but these errors were encountered: