-
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
Accept color name "magenta" instead of "purple" #13261
Conversation
If most people edit their schemes in the settings UI, is there a benefit of changing the label in the settings.json only, without also changing it in the settings UI? How did the "magenta" get into the settings.json in the first place? In other words, if #11456 is about "purple" vs. "magenta" in general (because ECMA-48 calls it "magenta"), should we prefer changing the naming throughout the entire application to be consistent? Otherwise I'm worried whether only changing the settings.json parser will have any positive effect on the issue. |
There are other tools that generate terminal color schemes for terminal emulators, and we're a little different than the others in regard to that key. The original report of this (#2641 (comment)) greatly predates the SUI, when this would have been more of an issue. I don't think it's necessarily super valuable to change the whole app over to Magenta instead of purple (that would of course cause a rewrite of everyone's settings). I do think it's valuable to gracefully accept |
Thank you for the feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
When loading color schemes from Json, check if GetValueForKey failed. If
it did, and we were searching for the colors "purple"/"brightPurple",
swap out the color name with "magenta"/"brightMagenta" and try again.
This was tested manually by creating a new color scheme using the colors
"magenta"/"brightMagenta" and loading it, then printing colored text in
the terminal to assure that the colors were correctly assigned as
purple.
This changes the color loader to use an index pair table to add support
for alternate color names.
Validation Steps Performed
"magenta" and "brightMagenta"
and "brightPurple" in the UI
will appear in the colors defined as magenta and brightMagenta
will be saved as "purple" and "brightPurple" (I think this is the
right behavior, since calling them "magenta" is technically a
mistake)
"purple" and "brightPurple" still load properly
Closes #11456