Skip to content

Add escape sequences for setting/clearing foreground & background colors#17

Closed
fryeb wants to merge 2 commits intohelix-editor:masterfrom
fryeb:feature/osc-fg-bg-colors
Closed

Add escape sequences for setting/clearing foreground & background colors#17
fryeb wants to merge 2 commits intohelix-editor:masterfrom
fryeb:feature/osc-fg-bg-colors

Conversation

@fryeb
Copy link
Copy Markdown
Contributor

@fryeb fryeb commented Jan 29, 2026

Prerequisite for helix-editor/helix#15170
I've used https://ghostty.org/docs/vt/concepts/colors#color-specifications as a reference.

Thus far I've only added support for hexadecimal RGB with 8 bit color chanels. But this could be extended to support the other formats if desired.

See below screen recording (Ghostty v1.2.3 on MacOS Tahoe)

Screen.Recording.2026-01-29.at.12.52.16.pm.mov

I've used
https://ghostty.org/docs/vt/concepts/colors#color-specifications as a
reference.

Thus far I've only added support for hexadecimal RGB with 8 bit color
chanels. But this could be extended to support the other formats if
desired.
@fryeb fryeb force-pushed the feature/osc-fg-bg-colors branch from 78eeb50 to 3161d0e Compare February 4, 2026 20:55
@the-mikedavis
Copy link
Copy Markdown
Member

I like what WezTerm's OSC module does for this set of sequences, I think it fits the spec a bit more flexibly. I will partially merge this to steal your nice Cargo example 🙂

And I will look at updating & merging in your branch. I have my terminal configured with (probably too much) padding around the outside so adding support for this OSC is very visible to me!

@the-mikedavis
Copy link
Copy Markdown
Member

the-mikedavis commented Mar 14, 2026

Manually merged in b928da1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants