-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix swapped black/brightBlack in Solarized Dark #6618
Conversation
Console applications assume that backgrounds are black, and that `lightBlack`/`DarkGrey` are lighter than `black`/`Black`. This assumption is accounted for by all color schemes in `defaults.json`, except for the Solarized themes. This change affects the Solarized Dark color scheme, causing `black` and `background` to be the same (which is common throughout the color schemes), and causing `brightBlack` (`DarkGray` in .NET) to be lighter than black (which is obviously more correct given the meanings of those words).
Personally, I don't like the lack of contrast that |
If you think the Solarized colors need changing you should really submit a PR with the official Solarized repository (https://github.com/altercation/solarized). We're just using the colors defined there. Otherwise just use a different color scheme. Solarized is clearly not a good choice for use with PowerShell, but not everyone uses the same applications as you, and some people actually like Solarized exactly as it is. |
I am using my own implementation that doesn't have these problems. I'm making this PR and arguing in its favor on behalf of the community. I care about this software, this color scheme, and their adoption. I believe strongly that my efforts are aligned with the goals both of Windows Terminal and Solarized.
I see now that Solarized officially associates This issue has been in discussion on the Solarized repo since 2012. It's a very slow-moving repo that rarely makes commits - most new commits constitute the addition of configurations for new software to use the already-established scheme. The readme itself hasn't been updated since 2016. It's unreasonable to think that this will change anytime soon. Why would Ethan bother with something like that when it's easy enough for people to fix it in their own implementations? As many, in fact, do. Meanwhile, a fresh install of Windows Terminal becomes temporarily unusable with a single innocuous setting change. Is that really acceptable? If a third party library has a bug, and leaves your patch in limbo for years, it's very common to fork so that you can continue to use it without leaving undesirable bugs in your own software. I'm sure Microsoft does this all the time. This is the same principle. Regardless of the Solarized PR feasibility, the table that associates
This says nothing about
The Windows Terminal implementation of Solarized is arguably in violation of this. My flags have zero contrast in Dark, some contrast in Light. My numbers have zero contrast in Light, some contrast in Dark. This PR improves Windows Terminal's conformance to this aspect of Solarized. Solarized defines some particular choices for which text colors are appropriate on which backgrounds. The readme defines a dark background as Overall, the recurring theme of Solarized's readme is readability, readability, readability. Placing Given all of this, I hope you find it within reason that this PR remains true to the definition of "Solarized Dark". That cleared, this becomes a wonderfully easy opportunity to improve the usability of your software, which is surely more important than staying true to some particular terminal color association suggested once (in a contradictory manner) by a 3rd party.
I like Solarized exactly as-is, too. But I don't like the Windows Terminal mappings for Solarized Dark. Changing these doesn't mean changing Solarized, but does mean fixing a usability issue. Among the many related issue reports that I found, I count at least 10 Solarized users voicing support for a fix, one maintainer and one user declaring that they don't use solarized at all for unrelated reasons, maintainer @zadjii-msft suggesting at one point to make a PR that does exactly what mine does, and your own explanations of why it is the way it is, but I see 0 users disagreeing with the call for change and no maintainer arguing that the colors are better the way that they currently are. Given how frequently this arises as a duplicate issue, you may also consider that accepting this PR will save the maintainers time. |
I'm going to try to set my opinions on Solarized aside for a moment. Okay. Here goes. Out of the box, we ship a pretty shitty behavior. If I look at all of the existing shipped color schemes--and that includes things like Tango and One Half--we are universally following a If I consult gnome-terminal or xterm, they do the same thing; Xterm by default, gnome-terminal for solarized. The background generally matches color index I want to put our Solarized schemes on a deprecation path, but unfortunately we still need to ship something for users who we're going to strand on them. I'm going to have to swallow my bitter and say that yes, we should probably just change the index mapping and go with something that works right out of the box while we figure out how to do perceptual color nudging and eventually remove bad defaults (like Campbell and Solarized D). @M-Pixel would you mind making the same change for Solarized Light, such that black/brightBlack match Solarized Dark? (with apologies to @j4james. James, I regret shipping this scheme. I'd like to make it as unsucky as possible for the month or two while users are transitioning off it onto their own schemes.) |
I really don't care what we set the colors too, as long as it reduces the bug reports, and I'm not sure this helps that much. My main concern is that we're going to be swapping one set of complaints for another. And while I don't mind telling people that don't like Solarized to just not use it, I don't know what to tell people that do actually like Solarized when they ask why we've deliberately broken their color scheme. That said, if the real Solarized users are a small minority, then maybe this is the least worst option. Your metrics should be able to answer that question. |
Original notes from @M-Pixel: > Console applications assume that backgrounds are black, and that > `lightBlack`/`DarkGrey` are lighter than `black`/`Black`. This > assumption is accounted for by all color schemes in `defaults.json`, > except for the Solarized themes. > > The Solarized Dark theme, in particular, makes `-Parameters` invisible > against the background in PowerShell, which is obviously an unacceptable > usability flaw. > > This change makes `black` and `background` to the same (which is common > throughout the color schemes), and makes `brightBlack` (`DarkGray` in > .NET) lighter than black (which is obviously more correct given the > meanings of those words). Out of the box, we ship a pretty bad behavior. If I look at all of the existing shipped color schemes--and that includes things like Tango and One Half--we are universally following a `background` == `black` rule. If I consult gnome-terminal or xterm, they do the same thing; Xterm by default, gnome-terminal for solarized. The background generally matches color index `0` across all their **dark** schemes. Konsole and lxterminal disagree and map background to `0 intense` for Solarized. I want to put our Solarized schemes on a deprecation path, but unfortunately we still need to ship _something_ for users who we're going to strand on them. I'm going to have to swallow my bitter and say that yes, we should probably just change the index mapping and go with something that works right out of the box while we figure out how to do perceptual color nudging and eventually remove bad defaults (like Solarized). From #6618. Fixes #4047. Closes #6618.
Original notes from @M-Pixel: > Console applications assume that backgrounds are black, and that > `lightBlack`/`DarkGrey` are lighter than `black`/`Black`. This > assumption is accounted for by all color schemes in `defaults.json`, > except for the Solarized themes. > > The Solarized Dark theme, in particular, makes `-Parameters` invisible > against the background in PowerShell, which is obviously an unacceptable > usability flaw. > > This change makes `black` and `background` to the same (which is common > throughout the color schemes), and makes `brightBlack` (`DarkGray` in > .NET) lighter than black (which is obviously more correct given the > meanings of those words). Out of the box, we ship a pretty bad behavior. If I look at all of the existing shipped color schemes--and that includes things like Tango and One Half--we are universally following a `background` == `black` rule. If I consult gnome-terminal or xterm, they do the same thing; Xterm by default, gnome-terminal for solarized. The background generally matches color index `0` across all their **dark** schemes. Konsole and lxterminal disagree and map background to `0 intense` for Solarized. I want to put our Solarized schemes on a deprecation path, but unfortunately we still need to ship _something_ for users who we're going to strand on them. I'm going to have to swallow my bitter and say that yes, we should probably just change the index mapping and go with something that works right out of the box while we figure out how to do perceptual color nudging and eventually remove bad defaults (like Solarized). From #6618. Fixes #4047. Closes #6618. (cherry picked from commit 04f5ee7)
Original notes from @M-Pixel: > Console applications assume that backgrounds are black, and that > `lightBlack`/`DarkGrey` are lighter than `black`/`Black`. This > assumption is accounted for by all color schemes in `defaults.json`, > except for the Solarized themes. > > The Solarized Dark theme, in particular, makes `-Parameters` invisible > against the background in PowerShell, which is obviously an unacceptable > usability flaw. > > This change makes `black` and `background` to the same (which is common > throughout the color schemes), and makes `brightBlack` (`DarkGray` in > .NET) lighter than black (which is obviously more correct given the > meanings of those words). Out of the box, we ship a pretty bad behavior. If I look at all of the existing shipped color schemes--and that includes things like Tango and One Half--we are universally following a `background` == `black` rule. If I consult gnome-terminal or xterm, they do the same thing; Xterm by default, gnome-terminal for solarized. The background generally matches color index `0` across all their **dark** schemes. Konsole and lxterminal disagree and map background to `0 intense` for Solarized. I want to put our Solarized schemes on a deprecation path, but unfortunately we still need to ship _something_ for users who we're going to strand on them. I'm going to have to swallow my bitter and say that yes, we should probably just change the index mapping and go with something that works right out of the box while we figure out how to do perceptual color nudging and eventually remove bad defaults (like Solarized). From #6618. Fixes #4047. Closes #6618. (cherry picked from commit 04f5ee7)
🎉This issue was addressed in #6985, which has now been successfully released as Handy links: |
1 similar comment
🎉This issue was addressed in #6985, which has now been successfully released as Handy links: |
🎉This issue was addressed in #6985, which has now been successfully released as Handy links: |
Summary of the Pull Request
Console applications assume that backgrounds are black, and that
lightBlack
/DarkGrey
are lighter thanblack
/Black
. This assumption is accounted for by all color schemes indefaults.json
, except for the Solarized themes.The Solarized Dark theme, in particular, makes
-Parameters
invisible against the background in PowerShell, which is obviously an unacceptable usability flaw.This change makes
black
andbackground
to the same (which is common throughout the color schemes), and makesbrightBlack
(DarkGray
in .NET) lighter than black (which is obviously more correct given the meanings of those words).References
#4047
PR Checklist
Validation Steps Performed
-Flags
in PowerShell are now visible.