You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Powerline symbols in the terminal get wrong colors #146406
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesterminal-renderingupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstreamverifiedVerification succeeded
Reacted by Levin Rickert, Andrew King, Ben Tea, Michael Flucher, DENPO, Benjamin Gustin, Julian Valentin, William Sedlacek, ceri, Richard Herman and 19 more
Yeah, but IMO 4.5 shouldn't be the default because suddenly the ansi terminal colors requested aren't the ones requested. It's another layer of confusion on top of something already confusing. This change isn't really a net benefit.
Reacted by chtenb, Kat21, Justin, Jacob Squires, Tineyi and tsukumi
My prompt uses Powerline symbols, so I had this issue after upgrading to 1.66 as well. I think making the terminal accessible by default is a good call, but it also presents a problem for prompts that switch between using the same color for background and foreground to create the illusion of shaped blocks (like Powerline). I'm sure this affects heavily-customized vim and Emacs setups that do similar things, too.
If a user still wanted to have the contrast ratio functionality, it might be nice to have a setting like terminal.integrated.excludeContrastRatioAdjustment that would be a string of characters to exclude from contrast ratio adjustment.
Reacted by Ben Tea, Levin Rickert, Kat21, Justin, Jacob Squires, Veeti Haapsamo and tsukumi
This feature has been around for a long time but we changed the default in 1.66 as we're trying to make VS Code the most accessible code editor out there. You can see some of the background on the change here: #144411, I know this might cause an inconvenience but the net benefit is quite large:
The terminal should be accessible regardless of your shell and operating system - accessibility is very important to our team
It's trivial to disable by setting "terminal.integrated.minimumContrastRatio": 1, you could argue that it's hard to discover this but it's equally hard for users where this makes the terminal unusable to discover it for the inverse problem.
I'm also confused why it changes the color of the powerline rectangles? This doesn't seem to be correct or am I missing something here?
Levin Rickert (@levrik) yes it's because how powerlines works is a bit of a hack; for the triangle character, it inverts the background/foreground color so the shape on the left is the foreground and the negative space on the right is the background.
If a user still wanted to have the contrast ratio functionality, it might be nice to have a setting like terminal.integrated.excludeContrastRatioAdjustment that would be a string of characters to exclude from contrast ratio adjustment.
Jamin Thornsberry (@jaminthorns) I like the idea of excluding at the least the triangle powerline char from minimum contrast ratio 👍, this character will almost always be used to simulate the background color so it's a nice compromise. This also comes with the nice benefit of still retaining min contrast ratio in the prompt when a powerline is used.
Reacted by Ben Tea, Jamin Thornsberry, Levin Rickert, Isidor Nikolic, Tony, Phil Scott, Eric Amodio, Kat21, Homa Wong, Tineyi and 6 more
verify that changing the terminal.integrated.minimumContrastRatio does not alter the color of the powerline glyphs for all values of the terminal.integrated.gpuAcceleration setting
I have been fighting this issue for a while, and finally (thankfully) came across this thread. I'd just like to share my thoughts.
An accessibility feature is great, but it should be opt-in. Most people who might use this setting probably have their systems tuned specifically to their liking anyway. What this feature does in its (currently) default state is completely muck around with the way I've painstakingly set up my prompt.
Don't take this the wrong way, but it's just like Microsoft to think people can't set up their computers the way they want, and decide that they need to try to tweak things to fix what ain't broke. 🤣
Justin (@jstm88) we obviously value accessibility more that you 🤷
This issue is closed with a fix that should work for everyone. If the extra contrast still bothers you you can switch it off by tweaking terminal.integrated.minimumContrastRatio, I trust that you can set up your computer the way you want 😉
Justin (@jstm88) we obviously value accessibility more that you 🤷
This issue is closed with a fix that should work for everyone. If the extra contrast still bothers you you can switch it off by tweaking terminal.integrated.minimumContrastRatio, I trust that you can set up your computer the way you want 😉
There are two basic types of accessibility that are relevant here:
Designing the parts of the application you control to have good accessibility properties
Options that modify expected behavior
1 is obviously good, but 2 is a problem if enabled by default. We don't ship computers with high-contrast mode, large type, and text-to-speech enabled by default, do we? It would be silly.
The way I understand the fix that's been proposed is that it will make an exception for specific fonts, but it will still modify the colors displayed. This is still bad - you're making edge cases that have to be maintained, and you're opening the door for more of those edge cases as people inevitably discover all of the additional places where it breaks.
I'll further propose that, perhaps, this setting doesn't really make a lot of sense in the context of a terminal. There's a very simple solution that doesn't require these modifications - just add additional themes for the Terminal with an accessible color palette. Simple and it doesn't introduce edge cases.
I'm glad accessibility is being considered, but I just think this implementation (specifically making it the default) was ill-advised.
Reacted by Kilian Evang, chtenb, tsukumi and Umut Topuzoğlu
1 is obviously good, but 2 is a problem if enabled by default. We don't ship computers with high-contrast mode, large type, and text-to-speech enabled by default, do we? It would be silly.
Justin (@jstm88) Yes it would be silly, but this is a special case where we cannot guarantee contrast between the theme and the application/shell running in the terminal and many users would run into contrast issues because of this where characters were invisible. Plus the default isn't "high contrast", it's to shift the colors towards the minimum recommended contrast as recommended by WCAG AA (4.5) which is not particularly high.
Bottom line is we have requirements we need to meet around accessibility and this is one of those. You could argue this goes above and beyond what is required, but the tradeoff here after the fix is a good and worth it as contrast will be guaranteed regardless of theme, it only modifies the foreground color so shouldn't be particularly noticeable to most users and it can be easily disabled if it's bothersome.
I'll further propose that, perhaps, this setting doesn't really make a lot of sense in the context of a terminal.
The feature was inspired by iTerm2, so we're not the only ones that think it's a good idea. The "just change your theme" approach doesn't work for all background/foreground combinations as that's impossible and we also don't have distinct editor/terminal themes (like Atom), so you'd be forcing those users who want reasonable contrast to use the few (and ugly) high contrast themes.
Daniel Imms (@Tyriar) Those are some good points, and I do see where the setting could still make sense even if there was theme support.
Still, though, if the option is going to be enabled by default, there absolutely needs to be a notification. There's an established UI paradigm for exactly this case - a panel in the corner, informing the user that the option was automatically changed, with a choice to disable it or accept the change. The notification could appear the first time the Terminal feature is used.
Justin (@jstm88) we've been fighting "notification fatigue" for a long time, adding a notification for such a minor thing would annoy people. Adding notifications to VS Code core are all heavy scrutinized to protect the user experience and keep VS Code feeling "lightweight".
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesterminal-renderingupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstreamverifiedVerification succeeded
Activity
yume-chan commentedon Mar 31, 2022
"terminal.integrated.minimumContrastRatio": 1oleq commentedon Mar 31, 2022
Works like a charm, thanks. This could be mentioned in https://code.visualstudio.com/api/references/theme-color, though.
rewrking commentedon Mar 31, 2022
Thanks. Would love to know why this isn't the default.
oleq commentedon Mar 31, 2022
WCAG accessibility guidelines. To make colorful terminal applications look at least okayish no matter the user theme. Makes sense. Mentioned in https://code.visualstudio.com/updates/v1_41#_minimum-contrast-ratio.
I wonder why this affected my setup now since this has been implemented since 1.41 in 2019? What changed in the recent 1.66 update? 🤔
yume-chan commentedon Mar 31, 2022
Yes, it was changed in this month #144762 (comment)
rewrking commentedon Mar 31, 2022
Yeah, but IMO 4.5 shouldn't be the default because suddenly the ansi terminal colors requested aren't the ones requested. It's another layer of confusion on top of something already confusing. This change isn't really a net benefit.
levrik commentedon Mar 31, 2022
I'm also confused why it changes the color of the powerline rectangles? This doesn't seem to be correct or am I missing something here?
Edit: Ah. Probably because the background is used to fill the rest of the character with the following color, I see.
jaminthorns commentedon Mar 31, 2022
My prompt uses Powerline symbols, so I had this issue after upgrading to 1.66 as well. I think making the terminal accessible by default is a good call, but it also presents a problem for prompts that switch between using the same color for background and foreground to create the illusion of shaped blocks (like Powerline). I'm sure this affects heavily-customized vim and Emacs setups that do similar things, too.
If a user still wanted to have the contrast ratio functionality, it might be nice to have a setting like
terminal.integrated.excludeContrastRatioAdjustmentthat would be a string of characters to exclude from contrast ratio adjustment.Tyriar commentedon Mar 31, 2022
This feature has been around for a long time but we changed the default in 1.66 as we're trying to make VS Code the most accessible code editor out there. You can see some of the background on the change here: #144411, I know this might cause an inconvenience but the net benefit is quite large:
"terminal.integrated.minimumContrastRatio": 1, you could argue that it's hard to discover this but it's equally hard for users where this makes the terminal unusable to discover it for the inverse problem.FYI Isidor Nikolic (@isidorn) about feedback
Aleksander Nowodzinski (@oleq) good idea!
Levin Rickert (@levrik) yes it's because how powerlines works is a bit of a hack; for the triangle character, it inverts the background/foreground color so the shape on the left is the foreground and the negative space on the right is the background.
Jamin Thornsberry (@jaminthorns) I like the idea of excluding at the least the triangle powerline char from minimum contrast ratio 👍, this character will almost always be used to simulate the background color so it's a nice compromise. This also comes with the nice benefit of still retaining min contrast ratio in the prompt when a powerline is used.
24 remaining items
adjust docs for microsoft/vscode#146406
meganrogge commentedon Apr 21, 2022
to verify:
terminal.integrated.minimumContrastRatiodoes not alter the color of the powerline glyphs for all values of theterminal.integrated.gpuAccelerationsettingJanDeDobbeleer commentedon Apr 21, 2022
Megan Rogge (@meganrogge) awesome work! I'll validate it in the morning (evening here).
jstm88 commentedon May 3, 2022
I have been fighting this issue for a while, and finally (thankfully) came across this thread. I'd just like to share my thoughts.
An accessibility feature is great, but it should be opt-in. Most people who might use this setting probably have their systems tuned specifically to their liking anyway. What this feature does in its (currently) default state is completely muck around with the way I've painstakingly set up my prompt.
Don't take this the wrong way, but it's just like Microsoft to think people can't set up their computers the way they want, and decide that they need to try to tweak things to fix what ain't broke. 🤣
Tyriar commentedon May 3, 2022
Justin (@jstm88) we obviously value accessibility more that you 🤷
This issue is closed with a fix that should work for everyone. If the extra contrast still bothers you you can switch it off by tweaking
terminal.integrated.minimumContrastRatio, I trust that you can set up your computer the way you want 😉jstm88 commentedon May 4, 2022
There are two basic types of accessibility that are relevant here:
1 is obviously good, but 2 is a problem if enabled by default. We don't ship computers with high-contrast mode, large type, and text-to-speech enabled by default, do we? It would be silly.
The way I understand the fix that's been proposed is that it will make an exception for specific fonts, but it will still modify the colors displayed. This is still bad - you're making edge cases that have to be maintained, and you're opening the door for more of those edge cases as people inevitably discover all of the additional places where it breaks.
I'll further propose that, perhaps, this setting doesn't really make a lot of sense in the context of a terminal. There's a very simple solution that doesn't require these modifications - just add additional themes for the Terminal with an accessible color palette. Simple and it doesn't introduce edge cases.
I'm glad accessibility is being considered, but I just think this implementation (specifically making it the default) was ill-advised.
Tyriar commentedon May 4, 2022
Justin (@jstm88) Yes it would be silly, but this is a special case where we cannot guarantee contrast between the theme and the application/shell running in the terminal and many users would run into contrast issues because of this where characters were invisible. Plus the default isn't "high contrast", it's to shift the colors towards the minimum recommended contrast as recommended by WCAG AA (4.5) which is not particularly high.
Bottom line is we have requirements we need to meet around accessibility and this is one of those. You could argue this goes above and beyond what is required, but the tradeoff here after the fix is a good and worth it as contrast will be guaranteed regardless of theme, it only modifies the foreground color so shouldn't be particularly noticeable to most users and it can be easily disabled if it's bothersome.
The feature was inspired by iTerm2, so we're not the only ones that think it's a good idea. The "just change your theme" approach doesn't work for all background/foreground combinations as that's impossible and we also don't have distinct editor/terminal themes (like Atom), so you'd be forcing those users who want reasonable contrast to use the few (and ugly) high contrast themes.
jstm88 commentedon May 4, 2022
Daniel Imms (@Tyriar) Those are some good points, and I do see where the setting could still make sense even if there was theme support.
Still, though, if the option is going to be enabled by default, there absolutely needs to be a notification. There's an established UI paradigm for exactly this case - a panel in the corner, informing the user that the option was automatically changed, with a choice to disable it or accept the change. The notification could appear the first time the Terminal feature is used.
Tyriar commentedon May 4, 2022
Justin (@jstm88) we've been fighting "notification fatigue" for a long time, adding a notification for such a minor thing would annoy people. Adding notifications to VS Code core are all heavy scrutinized to protect the user experience and keep VS Code feeling "lightweight".