-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Environment
Windows build number: Version 10.0.18362.657
Windows Terminal version (if applicable): 0.10.781.0
Steps to reproduce
- Open a bash shell in conhost.
- Execute
printf "\e[0;38;5;3mDARK \e[1mBRIGHT?\e[m\n" - Open a bash shell in Window Terminal.
- Execute
printf "\e[0;38;5;3mDARK \e[1mBRIGHT?\e[m\n"
Expected behavior
Both terminals should produce the same output showing the same colors.
Actual behavior
Conhost displays the "BRIGHT?" text in the same dark shade as the "DARK" text. Windows Terminal displays it brighter.
In some ways this could be considered a narrowing bug (issue #2661), because one reason for the difference is that conhost converts the indexed color into an RGB value before storing it, while the Windows Terminal doesn't. And the bold/bright attribute has no effect on RGB colors, but does affect indexed colors.
That said, I don't think the WT implementation is correct, so fixing the "narrowing" issue in conhost is just going to make both of them wrong. There is some room for interpretation here, but I've been looking at how other terminals handle this, and AFAICT most (including XTerm and VTE) will only apply the brightness attribute to the 8 basic colors, and not the 256 indexed colors from SGR 38/48.
So this is really a question as much as it is a bug report. Which behavior do we want to follow here? Because the answer to that is going to affect how we address issue #2661.
