-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
color "brightWhite" and its usage in WSL man pages #2864
Comments
This sounds a lot like #2638 to me |
@zadjii-msft Thanks for linking. Looks similar.
|
#2638 may mitigate the issue, but it doesn't solve the underlying problem. And that is that the bold/bright attribute doesn't work correctly when the default foreground color isn't "white" (more specifically, index color 7). In the One Half Light color scheme, the default colors are
should be the equivalent of selecting the default colors, and then the bold attribute, like this:
But in the latter sequence, the "bold" text becomes bright white instead of bright black. I'm a fairly certain that is not what we want. |
On further investigation, I believe the fault may be in the way the Windows Terminal applies the color scheme. If you set the palette using escape sequences, then it works correctly. For example, this is the equivalent set of escape sequences to initialize the palette with the One Half Light color scheme:
If you run |
@j4james Thanks for investigating the issues. The bold text in the man pages is properly colored after executing those lines. As workaround, I could copy your code into my What exactly does |
|
This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes. |
@zadjii-msft I'm fairly certain this isn't a duplicate, or at least not a duplicate of #2638. |
I'm worried about this issue. I know that we have a duplicate somewhere, but I just can't find it. This is actually partially related to #293 (we transform Ref #2661, plus the bug report I just can't find for "foreground but bold". |
(or, equally likely, we transform 37 into 39, but we don't transform 97 into 1;39 or 99. There's a bit of nuance. :)) |
I don't think it's a narrowing bug, or anything along those lines, because why then would it work when the palette is set via escape sequences? It's the exact same colors being used, so surely they should fail in the same way if that were the case? My theory (which I haven't had a chance to investigate) is that the Windows Terminal might be trying to handle the palette mapping exclusively on the terminal side, and not passing that info through to conhost. So conhost still thinks it's working with the default palette (or whatever settings it has), and when you've got a derived color (from the bold attribute), there's no longer a direct link back to the correct color on the Terminal side. Btw, I can accept this might still be a dup. I just didn't want it to get lost if the dup closure was based on #2638, which definitely isn't the issue here. |
It definitely is, and it should be. #2661 is one of the things that's caused by conhost caring too much. Setting the color palette actually leverages the issue in 2661 to fix this one. If you do this:
(powershell syntax, sorry) and then just use If we stop querying the color table in conhost when we need to figure out which index to use to set the color we think we want, we'll start passing through color indices unharmed. You're right that the derived color is being matched against the wrong index, but really we shouldn't be using color index derivations at all. 😄 |
(sorry, i realized i just said the same thing three times there at the end.) |
OK, I think I get it now. So if the color was simply passed through from conhost as default + bold, without trying to map it to an index or COLORREF, then the Terminal side would actually have been able to map that to the correct palette values? In that I'm assuming #2661 might fix this. |
Indeed. 😄 |
This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes. |
Possibly this issue is not an issue of Windows Terminal but of WSL or of one specific distribution within WSL.
Environment
Steps to reproduce
profiles.json
fileman grep
)brightWhite
in the choosen color schemaExpected behavior
General text should be colored in generic colors such as
foreground
or explicit colors likebrightWhite
should change their color.Actual behavior
The WSL man page seems to use
brightWhite
for highlighted text in man pages.brightWhite
remains white in the light themes. The remaining text has the colorforeground
.grep manpage with default color schema
One Half Light
:grep manpage with modified color schema
One Half Light
(brightWhite
set to#FFFFFF
):The text was updated successfully, but these errors were encountered: