Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept color name "magenta" instead of "purple" (#13261)
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 - Manually edit settings.json, creating a new color scheme with colors "magenta" and "brightMagenta" - View the color scheme in settings - the colors will appear as "purple" and "brightPurple" in the UI - Run a program that prints colored text, purple and brightPurple text will appear in the colors defined as magenta and brightMagenta - Modify the color scheme in the settings UI and save it, the colors will be saved as "purple" and "brightPurple" *(I think this is the right behavior, since calling them "magenta" is technically a mistake)* - Repeat the steps above with a normal color scheme - colors named "purple" and "brightPurple" still load properly Closes #11456
- Loading branch information