[PR #13261] [MERGED] Accept color name "magenta" instead of "purple" #29447

Open
opened 2026-01-31 09:34:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13261
Author: @matthewd673
Created: 6/10/2022
Status: ✅ Merged
Merged: 6/10/2022
Merged by: @undefined

Base: main ← Head: magenta-tablecolor


📝 Commits (2)

📊 Changes

1 file changed (+36 additions, -22 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/ColorScheme.cpp (+36 -22)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13261 **Author:** [@matthewd673](https://github.com/matthewd673) **Created:** 6/10/2022 **Status:** ✅ Merged **Merged:** 6/10/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `magenta-tablecolor` --- ### 📝 Commits (2) - [`8f799b6`](https://github.com/microsoft/terminal/commit/8f799b67c4b00ee5bfa1875d2d9d8d3e8347e1ab) Check alt color names in Json (#11456) - [`3fc5cd0`](https://github.com/microsoft/terminal/commit/3fc5cd0a3fbacc8269e4ab1cdae6fc3c0944ce11) Update check for alternate color names ### 📊 Changes **1 file changed** (+36 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/ColorScheme.cpp` (+36 -22) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:34:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29447