[PR #50] [MERGED] Add support for using ColorTool in WSL #24063

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/50
Author: @zadjii-msft
Created: 1/19/2018
Status: Merged
Merged: 10/2/2018
Merged by: @miniksa

Base: masterHead: osc-color


📝 Commits (9)

  • 5b47a58 Prototype support for WSL
  • 48021e1 fix the xterm version
  • 9a5393d Fix printing the table in vt mode
  • 85e347f I guess I didn't need this after all
  • eba68a0 Enable setting the colors w/ VT even on windows
  • f1627dd merge master
  • 0c3872d Merge branch 'master' into osc-color
  • 15c2e57 Use helper and move constant for STD_OUTPUT_HANDLE. Use string interpolation for colors. Use Color object and UIntToColor helper for creating our pattern. Add SetLastError annotations to native functions.
  • 4272e9c These masks were unused after I used the color helper. Removing.

📊 Changes

3 files changed (+334 additions, -154 deletions)

View changed files

📝 tools/ColorTool/ColorTool/ConsoleAPI.cs (+24 -3)
📝 tools/ColorTool/ColorTool/Program.cs (+165 -8)
📝 tools/ColorTool/ColorTool/Resources.resx (+145 -143)

📄 Description

Because most of the console API's don't work in WSL via interop, ColorTool wouldn't work inside of the WSL environment.

As of recent Windows 10 Insider's builds, we added support for a VT sequence you can use to set the color table. With that support added, ColorTool can instead emit the appropriate VT sequences, and change the color table that way in Windows builds after 17048.


🔄 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/50 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/19/2018 **Status:** ✅ Merged **Merged:** 10/2/2018 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `osc-color` --- ### 📝 Commits (9) - [`5b47a58`](https://github.com/microsoft/terminal/commit/5b47a58a3a9d114b29528eedcaa93b2f263b4f22) Prototype support for WSL - [`48021e1`](https://github.com/microsoft/terminal/commit/48021e1d75f609ebb9771fefc7d130bc596956d7) fix the xterm version - [`9a5393d`](https://github.com/microsoft/terminal/commit/9a5393d49d3bdafdccd7011f1630630fea754521) Fix printing the table in vt mode - [`85e347f`](https://github.com/microsoft/terminal/commit/85e347fc4a92b38aeb582333c7e9d83d278e85bf) I guess I didn't need this after all - [`eba68a0`](https://github.com/microsoft/terminal/commit/eba68a04b6f8bfd3dcea1feff8c4e9b7be52c5cd) Enable setting the colors w/ VT even on windows - [`f1627dd`](https://github.com/microsoft/terminal/commit/f1627dd571765d962b6128df88cd4bc76fce055a) merge master - [`0c3872d`](https://github.com/microsoft/terminal/commit/0c3872d5777f47074028547308b768f46f6fdd02) Merge branch 'master' into osc-color - [`15c2e57`](https://github.com/microsoft/terminal/commit/15c2e57b96da4f4c14457be8b700d0aba04adef1) Use helper and move constant for STD_OUTPUT_HANDLE. Use string interpolation for colors. Use Color object and UIntToColor helper for creating our pattern. Add SetLastError annotations to native functions. - [`4272e9c`](https://github.com/microsoft/terminal/commit/4272e9c8e97d0c899c07bcf16739089c338523d3) These masks were unused after I used the color helper. Removing. ### 📊 Changes **3 files changed** (+334 additions, -154 deletions) <details> <summary>View changed files</summary> 📝 `tools/ColorTool/ColorTool/ConsoleAPI.cs` (+24 -3) 📝 `tools/ColorTool/ColorTool/Program.cs` (+165 -8) 📝 `tools/ColorTool/ColorTool/Resources.resx` (+145 -143) </details> ### 📄 Description Because most of the console API's don't work in WSL via interop, ColorTool wouldn't work inside of the WSL environment. As of recent Windows 10 Insider's builds, we added support for a VT sequence you can use to set the color table. With that support added, ColorTool can instead emit the appropriate VT sequences, and change the color table that way in Windows builds after 17048. --- <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:01:12 +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#24063