[PR #12087] [MERGED] Colortool: add support for truecolor fg/bg and cursor #28826

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12087
Author: @LuanVSO
Created: 1/4/2022
Status: Merged
Merged: 1/11/2022
Merged by: @undefined

Base: mainHead: colortool-bg-fg


📝 Commits (10+)

  • cb0ac83 Colortool: add support to change FG and BG
  • 4370c04 colortool: ini parser add non tabled fg/bg
  • 9bda172 colortool: allow fg/bg to be set in different ways
  • d9ccb4b colortool: add rgb fg/bg suport to default console
  • 8befcc3 spell check
  • 9a892f9 spell check 2
  • e55d966 colortool: add support for cursor color
  • ee0b881 Merge branch 'microsoft:main' into colortool-bg-fg
  • 7c29e92 fix crash, invalid value
  • e0dedd6 add fg/bg to included schemes

📊 Changes

13 files changed (+194 additions, -84 deletions)

View changed files

📝 src/tools/ColorTool/ColorTool/ColorScheme.cs (+4 -0)
📝 src/tools/ColorTool/ColorTool/ConsoleAttributes.cs (+3 -1)
📝 src/tools/ColorTool/ColorTool/ConsoleTargets/DefaultConsoleTarget.cs (+30 -2)
📝 src/tools/ColorTool/ColorTool/ConsoleTargets/TerminalSchemeConsoleTarget.cs (+4 -0)
📝 src/tools/ColorTool/ColorTool/ConsoleTargets/VirtualTerminalConsoleTarget.cs (+31 -23)
📝 src/tools/ColorTool/ColorTool/Program.cs (+19 -0)
📝 src/tools/ColorTool/ColorTool/SchemeManager.cs (+24 -26)
📝 src/tools/ColorTool/ColorTool/SchemeParsers/IniSchemeParser.cs (+31 -10)
📝 src/tools/ColorTool/ColorTool/SchemeParsers/JsonParser.cs (+1 -1)
📝 src/tools/ColorTool/ColorTool/SchemeParsers/XmlSchemeParser.cs (+4 -2)
📝 src/tools/ColorTool/schemes/campbell-legacy.ini (+9 -1)
📝 src/tools/ColorTool/schemes/campbell.ini (+25 -17)
📝 src/tools/ColorTool/schemes/cmd-legacy.ini (+9 -1)

📄 Description

Colortool: add support for truecolor fg/bg and cursor

PR Checklist

  • Closes Check status of TextBuffer Unit Tests in CI (#1160)
  • CLA signed. If not, go over here and sign the CLA
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

  • add support to RGB values in FOREGROUND/BACKGROUND keys of ini colorschemes.
  • add support to parse and change cursor color
  • add support for true rgb fg/bg to colortool, will only work for vt and default console as there's no way to set rgb values through the win api.
  • this pr does not add support for exporting an colorscheme with rgb fg/bg
  • this is my first time using C# so any feedback is appreciated.

Validation Steps Performed

manual testing


🔄 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/12087 **Author:** [@LuanVSO](https://github.com/LuanVSO) **Created:** 1/4/2022 **Status:** ✅ Merged **Merged:** 1/11/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `colortool-bg-fg` --- ### 📝 Commits (10+) - [`cb0ac83`](https://github.com/microsoft/terminal/commit/cb0ac83cfc6fc6a62b80246769563783694e4d00) Colortool: add support to change FG and BG - [`4370c04`](https://github.com/microsoft/terminal/commit/4370c042080be28700ee2903ea45f2dae4a3ea43) colortool: ini parser add non tabled fg/bg - [`9bda172`](https://github.com/microsoft/terminal/commit/9bda172d3021924928194407715eff5902ac7956) colortool: allow fg/bg to be set in different ways - [`d9ccb4b`](https://github.com/microsoft/terminal/commit/d9ccb4b9f682eecfb56a4410604b1fe66cf674b6) colortool: add rgb fg/bg suport to default console - [`8befcc3`](https://github.com/microsoft/terminal/commit/8befcc3e5093db1b31f7cada12b12a778bb32280) spell check - [`9a892f9`](https://github.com/microsoft/terminal/commit/9a892f98091656126aad4fc1cbe50c40059e439d) spell check 2 - [`e55d966`](https://github.com/microsoft/terminal/commit/e55d966f9f7d4184538230a1517746c6310b3d2a) colortool: add support for cursor color - [`ee0b881`](https://github.com/microsoft/terminal/commit/ee0b88186cb9ee2da9665f6350cd0df9dcbbf2f4) Merge branch 'microsoft:main' into colortool-bg-fg - [`7c29e92`](https://github.com/microsoft/terminal/commit/7c29e92fc170e1dd9f84fbe9e95b0feec331d313) fix crash, invalid value - [`e0dedd6`](https://github.com/microsoft/terminal/commit/e0dedd6fa96a6f30201cd7011ec7c472df250578) add fg/bg to included schemes ### 📊 Changes **13 files changed** (+194 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `src/tools/ColorTool/ColorTool/ColorScheme.cs` (+4 -0) 📝 `src/tools/ColorTool/ColorTool/ConsoleAttributes.cs` (+3 -1) 📝 `src/tools/ColorTool/ColorTool/ConsoleTargets/DefaultConsoleTarget.cs` (+30 -2) 📝 `src/tools/ColorTool/ColorTool/ConsoleTargets/TerminalSchemeConsoleTarget.cs` (+4 -0) 📝 `src/tools/ColorTool/ColorTool/ConsoleTargets/VirtualTerminalConsoleTarget.cs` (+31 -23) 📝 `src/tools/ColorTool/ColorTool/Program.cs` (+19 -0) 📝 `src/tools/ColorTool/ColorTool/SchemeManager.cs` (+24 -26) 📝 `src/tools/ColorTool/ColorTool/SchemeParsers/IniSchemeParser.cs` (+31 -10) 📝 `src/tools/ColorTool/ColorTool/SchemeParsers/JsonParser.cs` (+1 -1) 📝 `src/tools/ColorTool/ColorTool/SchemeParsers/XmlSchemeParser.cs` (+4 -2) 📝 `src/tools/ColorTool/schemes/campbell-legacy.ini` (+9 -1) 📝 `src/tools/ColorTool/schemes/campbell.ini` (+25 -17) 📝 `src/tools/ColorTool/schemes/cmd-legacy.ini` (+9 -1) </details> ### 📄 Description Colortool: add support for truecolor fg/bg and cursor ## PR Checklist * [x] Closes #1160 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments - add support to RGB values in FOREGROUND/BACKGROUND keys of ini colorschemes. - add support to parse and change cursor color - add support for true rgb fg/bg to colortool, will only work for vt and default console as there's no way to set rgb values through the win api. - this pr does not add support for exporting an colorscheme with rgb fg/bg - this is my first time using C# so any feedback is appreciated. ## Validation Steps Performed manual testing --- <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:31:00 +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#28826