[PR #11095] [MERGED] Implement the Delta E algorithm to improve color perception #28404

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11095
Author: @PankajBhojwani
Created: 8/31/2021
Status: ✅ Merged
Merged: 10/7/2021
Merged by: @undefined

Base: main ← Head: dev/pabhoj/delta_e


📝 Commits (10+)

📊 Changes

23 files changed (+453 additions, -9 deletions)

View changed files

📝 .github/actions/spelling/allow/math.txt (+7 -0)
📝 .github/actions/spelling/expect/web.txt (+2 -0)
📝 NOTICE.md (+37 -0)
📝 doc/cascadia/profiles.schema.json (+8 -0)
➕ src/cascadia/TerminalCore/ColorFix.cpp (+228 -0)
➕ src/cascadia/TerminalCore/ColorFix.hpp (+49 -0)
📝 src/cascadia/TerminalCore/ICoreAppearance.idl (+1 -0)
📝 src/cascadia/TerminalCore/Terminal.cpp (+7 -1)
📝 src/cascadia/TerminalCore/Terminal.hpp (+4 -0)
📝 src/cascadia/TerminalCore/terminalcore-common.vcxitems (+2 -0)
📝 src/cascadia/TerminalCore/terminalrenderdata.cpp (+76 -7)
📝 src/cascadia/TerminalSettingsEditor/Appearances.h (+2 -1)
📝 src/cascadia/TerminalSettingsEditor/Appearances.idl (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Appearances.xaml (+8 -0)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+8 -0)
📝 src/cascadia/TerminalSettingsModel/AppearanceConfig.cpp (+4 -0)
📝 src/cascadia/TerminalSettingsModel/AppearanceConfig.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+1 -0)
📝 src/cascadia/TerminalSettingsModel/IAppearanceConfig.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettings.cpp (+1 -0)

...and 3 more files

📄 Description

  • Implements the Delta E algorithm
  • Uses the Delta E algorithm to precalculate adjusted foreground values based on possible foreground/background color pairs in the color table
  • Adds a setting to use the adjusted foreground values when applicable

PR Checklist

Validation Steps Performed

Before:
color before

After (note dark blue):
color after


🔄 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/11095 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 8/31/2021 **Status:** ✅ Merged **Merged:** 10/7/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/pabhoj/delta_e` --- ### 📝 Commits (10+) - [`6373bae`](https://github.com/microsoft/terminal/commit/6373bae6c327f46c7c2eb9724ff4ba58848b665d) transfer - [`da2cad8`](https://github.com/microsoft/terminal/commit/da2cad83a61788421aa2df1aad95a546fc039e21) works - [`d1c9748`](https://github.com/microsoft/terminal/commit/d1c974830b26ca23a43e40e4d933d870738ab600) remove - [`0c8168b`](https://github.com/microsoft/terminal/commit/0c8168be92c5e264dc322c8b4e156faed43a5dee) method descriptions - [`7b1eefe`](https://github.com/microsoft/terminal/commit/7b1eefe50a9945e7134f5833149766e943022c8b) spell, format - [`f8003d3`](https://github.com/microsoft/terminal/commit/f8003d32c4da5d3022d0ab9e2dbefa231d9ee464) order - [`e4fced6`](https://github.com/microsoft/terminal/commit/e4fced6810685604b26139dfb1ab901942bb4db6) default on setting - [`041e5ce`](https://github.com/microsoft/terminal/commit/041e5ce3aeca2ade2970b061089039f6afb93d1e) remove colorspace - [`12e8d6c`](https://github.com/microsoft/terminal/commit/12e8d6c95801b0151d149574bc76bfde3f9b4224) neater - [`384bf49`](https://github.com/microsoft/terminal/commit/384bf498f1c178bf4c4e032e7511e2731cc0c6cd) private ### 📊 Changes **23 files changed** (+453 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/math.txt` (+7 -0) 📝 `.github/actions/spelling/expect/web.txt` (+2 -0) 📝 `NOTICE.md` (+37 -0) 📝 `doc/cascadia/profiles.schema.json` (+8 -0) ➕ `src/cascadia/TerminalCore/ColorFix.cpp` (+228 -0) ➕ `src/cascadia/TerminalCore/ColorFix.hpp` (+49 -0) 📝 `src/cascadia/TerminalCore/ICoreAppearance.idl` (+1 -0) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+7 -1) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+4 -0) 📝 `src/cascadia/TerminalCore/terminalcore-common.vcxitems` (+2 -0) 📝 `src/cascadia/TerminalCore/terminalrenderdata.cpp` (+76 -7) 📝 `src/cascadia/TerminalSettingsEditor/Appearances.h` (+2 -1) 📝 `src/cascadia/TerminalSettingsEditor/Appearances.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Appearances.xaml` (+8 -0) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/AppearanceConfig.cpp` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/AppearanceConfig.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/IAppearanceConfig.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettings.cpp` (+1 -0) _...and 3 more files_ </details> ### 📄 Description - Implements the Delta E algorithm - Uses the Delta E algorithm to precalculate adjusted foreground values based on possible foreground/background color pairs in the color table - Adds a setting to use the adjusted foreground values when applicable ## PR Checklist * [x] Closes #2638 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I work here ## Validation Steps Performed Before: <img width="759" alt="color before" src="https://user-images.githubusercontent.com/26824113/131576768-b3b9eebd-5933-45de-8da8-88a985070312.png"> After (note dark blue): <img width="760" alt="color after" src="https://user-images.githubusercontent.com/26824113/133158807-4e63198f-8a49-4d03-914e-55a5ad57d725.png"> --- <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:28:19 +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#28404