Skip to content

Make color0 distinct from background/foreground and fix helix theme - #5538

Merged
dhh merged 2 commits into
omacom:devfrom
lukehsiao-forks:dev
May 2, 2026
Merged

dhh merged 2 commits into
omacom:devfrom
lukehsiao-forks:dev

Conversation

@lukehsiao

@lukehsiao lukehsiao commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

image image image image image

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

screenshot-2026-05-01_16-54-06

After

screenshot-2026-05-01_16-43-44

Copilot AI review requested due to automatic review settings May 1, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 color0 in the white theme to a light gray distinct from pure white background.
  • Update color0 in the vantablack theme to a dark gray distinct from pure black background.
  • Update color0 in the flexoki-light theme 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.

@lukehsiao lukehsiao changed the title Make color0 distinct from background Make color0 distinct from background/foreground May 1, 2026
@lukehsiao lukehsiao mentioned this pull request May 1, 2026
Copilot AI review requested due to automatic review settings May 1, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread themes/ethereal/colors.toml Resolved
lukehsiao added 2 commits May 1, 2026 15:57
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
Copilot AI review requested due to automatic review settings May 1, 2026 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread default/themed/helix.toml.tpl Resolved
Comment thread default/themed/helix.toml.tpl Resolved
@lukehsiao lukehsiao changed the title Make color0 distinct from background/foreground Make color0 distinct from background/foreground and fix helix theme May 1, 2026
@dhh
dhh merged commit d80c98f into omacom:dev May 2, 2026
3 of 4 checks passed
dhh pushed a commit that referenced this pull request Aug 9, 2026
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]>
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
…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]>
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.

3 participants