Repository navigation
Make color0 distinct from background/foreground and fix helix theme - #5538
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts a few bundled themes so color0 is no longer identical to background, avoiding cases where UI elements that intentionally use color0 as a subtle “card/ruler” background become invisible.
Changes:
- Update
color0in thewhitetheme to a light gray distinct from pure white background. - Update
color0in thevantablacktheme to a dark gray distinct from pure black background. - Update
color0in theflexoki-lighttheme to a light neutral tone distinct from the background.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| themes/white/colors.toml | Makes color0 a subtle off-white so “card”/ruler backgrounds are visible on white. |
| themes/vantablack/colors.toml | Makes color0 a dark gray so subtle background surfaces are visible on black. |
| themes/flexoki-light/colors.toml | Sets color0 to a light neutral offset from the background for visible subtle UI surfaces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The majority of themes have color0 available as a subtle offset from the background. For flexoki-light, because color0 matched foreground, it wasn't subtle, and would cause invisible text when used as a background color (e.g., in text editor rulers). For vantablack, ethereal, hackerman, and white, color0 matched background and would cause invisible text when a theme wanted text to be de-emphasized. This patch makes it consistently a subtle offset from background.
Helix is more usable if the selection background is subtle. This is primarily because of [[1]], which makes a bright selection like we had before often make the foreground text unreadable in the picker preview. [1]: helix-editor/helix#12405
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
afa2839 (Rename bg/fg palette keys to background/foreground) aliased `color0` to plain background in theme color resolution, but the Helix template still uses `color0` as the subtle surface shade behind `ui.cursorline.primary`, `ui.virtual.ruler`, `ui.highlight`, and `ui.text.focus`. All four now render at exactly the background color and vanish: no cursorline, no ruler, and the picker's focused row is only distinguishable by its bold text. This is the same failure that d80c98f ("Make color0 distinct from background/foreground and fix helix theme", #5538) fixed back when themes defined color0 directly. Point those scopes at `lighter_background`, the semantic key for a surface one step off the background. Every first-party theme defines it distinct from background except Last Horizon and Solitude, which set the two equal on purpose; those, and legacy themes whose `lighter_background` falls back to background, render exactly as they do today. Assisted-by: Claude:claude-fable-5 Signed-off-by: Luke Hsiao <[email protected]>
…6638) afa2839 (Rename bg/fg palette keys to background/foreground) aliased `color0` to plain background in theme color resolution, but the Helix template still uses `color0` as the subtle surface shade behind `ui.cursorline.primary`, `ui.virtual.ruler`, `ui.highlight`, and `ui.text.focus`. All four now render at exactly the background color and vanish: no cursorline, no ruler, and the picker's focused row is only distinguishable by its bold text. This is the same failure that d80c98f ("Make color0 distinct from background/foreground and fix helix theme", omacom#5538) fixed back when themes defined color0 directly. Point those scopes at `lighter_background`, the semantic key for a surface one step off the background. Every first-party theme defines it distinct from background except Last Horizon and Solitude, which set the two equal on purpose; those, and legacy themes whose `lighter_background` falls back to background, render exactly as they do today. Assisted-by: Claude:claude-fable-5 Signed-off-by: Luke Hsiao <[email protected]>
The majority of themes have color0 available as a subtle offset from
the background. For flexoki-light, because color0 matched foreground, it
wasn't subtle, and would cause invisible text when used as a background
color (e.g., in text editor rulers). For vantablack, ethereal,
hackerman, and white, color0 matched background and would cause
invisible text when a theme wanted text to be de-emphasized.
This patch makes it consistently a subtle offset from background.
This is in the same vein as 3fabdf7
After screenshots
With these tweaks applied, these are some example elements I've drawn arrows at where some programs want to apply a subtle color. In the case of flexoki-light, this color was too strong (matching foreground). In the others, this color matched background and was invisible.
Make helix selection theme colors more subtle
Helix is more usable if the selection background is subtle. This is
primarily because of [1], which makes a bright selection like we had
before often make the foreground text unreadable in the picker preview.
Screenshots
Before
After