From d80c98f02546bb78638c57db55eaf7e19a69f13c Mon Sep 17 00:00:00 2001 From: Luke Hsiao Date: Sat, 2 May 2026 03:36:06 -0600 Subject: [PATCH] Make color0 distinct from background/foreground and fix helix theme (#5538) * Make color0 distinct from background/foreground 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. * 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. [1]: https://github.com/helix-editor/helix/issues/12405 --- default/themed/helix.toml.tpl | 7 +++---- themes/ethereal/colors.toml | 2 +- themes/flexoki-light/colors.toml | 2 +- themes/hackerman/colors.toml | 2 +- themes/vantablack/colors.toml | 2 +- themes/white/colors.toml | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/default/themed/helix.toml.tpl b/default/themed/helix.toml.tpl index 4cb2f91c..90ba441c 100644 --- a/default/themed/helix.toml.tpl +++ b/default/themed/helix.toml.tpl @@ -76,7 +76,7 @@ "ui.bufferline.active" = { fg = "foreground", bg = "background", underline = { color = "color5", style = "line" } } "ui.text" = "foreground" -"ui.text.focus" = { fg = "foreground", modifiers = ["bold"] } +"ui.text.focus" = { fg = "foreground", bg = "color0", modifiers = ["bold"] } "ui.text.inactive" = { fg = "color8" } "ui.text.directory" = { fg = "color4" } @@ -87,8 +87,7 @@ "ui.virtual.jump-label" = { fg = "color1", modifiers = ["bold"] } "ui.virtual.whitespace" = "color8" -"ui.selection" = { fg = "selection_foreground", bg = "selection_background" } -"ui.selection.primary" = { fg = "selection_foreground", bg = "selection_background" } +"ui.selection" = { bg = "color0" } "ui.cursor" = { fg = "background", bg = "cursor" } "ui.cursor.primary" = { fg = "background", bg = "cursor" } @@ -99,7 +98,7 @@ "ui.cursorline.primary" = { bg = "color0" } -"ui.highlight" = { fg = "selection_foreground", bg = "selection_background", modifiers = ["bold"] } +"ui.highlight" = { bg = "color0", modifiers = ["bold"] } "ui.menu" = { fg = "foreground", bg = "background" } "ui.menu.selected" = { fg = "background", bg = "foreground", modifiers = ["bold"] } diff --git a/themes/ethereal/colors.toml b/themes/ethereal/colors.toml index 75cedec8..dbce1ae4 100644 --- a/themes/ethereal/colors.toml +++ b/themes/ethereal/colors.toml @@ -5,7 +5,7 @@ background = "#060B1E" selection_foreground = "#060B1E" selection_background = "#ffcead" -color0 = "#060B1E" +color0 = "#3C486D" color1 = "#ED5B5A" color2 = "#92a593" color3 = "#E9BB4F" diff --git a/themes/flexoki-light/colors.toml b/themes/flexoki-light/colors.toml index 033c4d3a..1e3b8860 100644 --- a/themes/flexoki-light/colors.toml +++ b/themes/flexoki-light/colors.toml @@ -5,7 +5,7 @@ background = "#FFFCF0" selection_foreground = "#100F0F" selection_background = "#CECDC3" -color0 = "#100F0F" +color0 = "#DAD8CE" color1 = "#D14D41" color2 = "#879A39" color3 = "#D0A215" diff --git a/themes/hackerman/colors.toml b/themes/hackerman/colors.toml index 56aec2a9..517ff366 100644 --- a/themes/hackerman/colors.toml +++ b/themes/hackerman/colors.toml @@ -5,7 +5,7 @@ background = "#0B0C16" selection_foreground = "#0B0C16" selection_background = "#ddf7ff" -color0 = "#0B0C16" +color0 = "#3E4058" color1 = "#50f872" color2 = "#4fe88f" color3 = "#50f7d4" diff --git a/themes/vantablack/colors.toml b/themes/vantablack/colors.toml index e3b2267d..06addcc1 100644 --- a/themes/vantablack/colors.toml +++ b/themes/vantablack/colors.toml @@ -11,7 +11,7 @@ selection_foreground = "#000000" selection_background = "#ffffff" # Normal colors (ANSI 0-7) -color0 = "#000000" +color0 = "#404040" color1 = "#a4a4a4" color2 = "#b6b6b6" color3 = "#cecece" diff --git a/themes/white/colors.toml b/themes/white/colors.toml index de6cce97..e6e072ea 100644 --- a/themes/white/colors.toml +++ b/themes/white/colors.toml @@ -11,7 +11,7 @@ selection_foreground = "#ffffff" selection_background = "#1a1a1a" # Normal colors (ANSI 0-7) -color0 = "#ffffff" +color0 = "#c0c0c0" color1 = "#2a2a2a" color2 = "#3a3a3a" color3 = "#4a4a4a"