[PR #15599] Add support for SGR 58/59 (underline coloring) #30680

Closed
opened 2026-01-31 09:42:16 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15599

State: closed
Merged: No


Summary of the Pull Request

Adds support for underline coloring with SGR 58/59 sequences. ConPTY can now parse, store and send those sequences across console applications and client terminal app.

Tested it on Wezterm which already has support for drawing colored underlines. For testing, I replaced the prebundled OpenConsole.exe and conpty.dll from Wezterm with the modified versions.

printf "\n\e[4m\e[58;2;0;255;215mRGBCyanUnderline\e[24m \e[58;5;50m\e[4mINDEX256CyanUnderline\e[24m \e[4m\e[58;5;50m\e[38;2;255;0;95mUnderlineColorWithColoredText\e[24m \e[4m\e[38;5;50m\e[58;2;255;0;95mAnotherExample\n"

Above code produces output like so:

Left: Wezterm, Right: WindowsTerminal Dev
Screenshot 2023-06-25 183224

Changes aren't visible on WindowsTerminal as of now. Atleast one of the graphic render, E.g. AtlasEngine, needs to support coloring of underline and drawing them on screen. Will be working on this in next few days.

References and Relevant Issues

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15599 **State:** closed **Merged:** No --- ## Summary of the Pull Request Adds support for underline coloring with SGR 58/59 sequences. ConPTY can now parse, store and send those sequences across console applications and client terminal app. Tested it on Wezterm which already has support for drawing colored underlines. For testing, I replaced the prebundled `OpenConsole.exe` and `conpty.dll` from Wezterm with the modified versions. ```sh printf "\n\e[4m\e[58;2;0;255;215mRGBCyanUnderline\e[24m \e[58;5;50m\e[4mINDEX256CyanUnderline\e[24m \e[4m\e[58;5;50m\e[38;2;255;0;95mUnderlineColorWithColoredText\e[24m \e[4m\e[38;5;50m\e[58;2;255;0;95mAnotherExample\n" ``` Above code produces output like so: Left: Wezterm, Right: WindowsTerminal Dev ![Screenshot 2023-06-25 183224](https://github.com/microsoft/terminal/assets/55626797/b3f21fdd-bf19-4a32-8b88-c83d710310ce) *Changes aren't visible on WindowsTerminal as of now. Atleast one of the graphic render, E.g. AtlasEngine, needs to support coloring of underline and drawing them on screen. Will be working on this in next few days.* ## References and Relevant Issues ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed ## PR Checklist - [ ] Closes #xxx - [ ] 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 (if necessary)
claunia added the pull-request label 2026-01-31 09:42:16 +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#30680