Incorrectly displayed ANSI escape code ESC[40m #17938

Open
opened 2026-01-31 05:59:03 +00:00 by claunia · 0 comments
Owner

Originally created by @ilyachalov on GitHub (Jul 15, 2022).

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19043.0

Other Software

PowerShell 7.2.5

Steps to reproduce

Enter the command in 'PowerShell':

> "`e[30;40mtest`e[0m"

Expected Behavior

ANSI escape codes ESC[30m and ESC[40m is ANSI color 'Black'. It should be the same color, so there should be NO visible text in color ESC[30m on background ESC[40m.

It is said about it here:
https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

Actual Behavior

The text of color ESC[30m is visible on background ESC[40m:

test-in-powershell-wt

In the color scheme ('Campbell Powershell'):

color-scheme-campbell-powershell

Originally created by @ilyachalov on GitHub (Jul 15, 2022). ### Windows Terminal version 1.13.11431.0 ### Windows build number 10.0.19043.0 ### Other Software PowerShell 7.2.5 ### Steps to reproduce Enter the command in 'PowerShell': ``` > "`e[30;40mtest`e[0m" ``` ### Expected Behavior ANSI escape codes ESC[30m and ESC[40m is ANSI color 'Black'. It should be the same color, so there **should be NO visible** text in color ESC[30m on background ESC[40m. It is said about it here: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters ### Actual Behavior The text of color ESC[30m is visible on background ESC[40m: ![test-in-powershell-wt](https://user-images.githubusercontent.com/48008056/179143630-7571f912-402a-4f37-aa64-36f484150c4c.png) In the color scheme ('Campbell Powershell'): ![color-scheme-campbell-powershell](https://user-images.githubusercontent.com/48008056/179144102-2c3026fa-ead1-47f4-a6c1-2d0f6e4ec394.png)
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 05:59:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17938