From 97fd7615164bef8529613882e0ffa91c9a7bf928 Mon Sep 17 00:00:00 2001 From: Clay Tercek <30105080+claytercek@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:33:00 -0500 Subject: [PATCH 1/3] add accents for colored indent guides --- src/theme.js | 9 +++ themes/github_theme.json | 154 ++++++++++++++++++++++++++++----------- 2 files changed, 122 insertions(+), 41 deletions(-) diff --git a/src/theme.js b/src/theme.js index 238e24f..d6da613 100644 --- a/src/theme.js +++ b/src/theme.js @@ -59,6 +59,15 @@ export function getTheme({ themeKey, name, type }) { appearance: type, name, style: { + accents: [ + "blue", + "green", + "yellow", + "red", + "pink", + "purple", + ].map(color => tokens[`data/${color}/color/emphasis`]), + "background.appearance": "opaque", "background": tokens['bgColor/default'], diff --git a/themes/github_theme.json b/themes/github_theme.json index 4e87ea2..7345e2b 100644 --- a/themes/github_theme.json +++ b/themes/github_theme.json @@ -7,6 +7,14 @@ "appearance": "light", "name": "Github Light", "style": { + "accents": [ + "#006edbff", + "#30a147ff", + "#b88700ff", + "#df0c24ff", + "#ce2c85ff", + "#894cebff" + ], "background.appearance": "opaque", "background": "#ffffffff", "border": "#d1d9e0ff", @@ -422,6 +430,14 @@ "appearance": "light", "name": "Github Light Colorblind", "style": { + "accents": [ + "#006edbff", + "#30a147ff", + "#b88700ff", + "#df0c24ff", + "#ce2c85ff", + "#894cebff" + ], "background.appearance": "opaque", "background": "#ffffffff", "border": "#d1d9e0ff", @@ -435,10 +451,10 @@ "conflict.border": "#fb8f4466", "created": "#0969daff", "created.background": "#ddf4ffff", - "created.border": "#ddf4ffff", - "deleted": "#bc4c00ff", + "created.border": "#54aeff66", + "deleted": "#be4e02ff", "deleted.background": "#fff1e5ff", - "deleted.border": "#fff1e5ff", + "deleted.border": "#fb8f4466", "drop_target.background": "#ddf4ffff", "editor.active_line.background": "#f6f8faff", "editor.active_line_number": "#1f2328ff", @@ -459,7 +475,7 @@ "element.hover": "#818b981f", "element.selected": "#818b981f", "elevated_surface.background": "#ffffffff", - "error": "#bc4c00ff", + "error": "#be4e02ff", "error.background": "#f6f8faff", "error.border": "#d1d9e0b3", "ghost_element.active": "#818b981f", @@ -497,7 +513,7 @@ "predictive.border": "#d1d9e0b3", "renamed": "#0969daff", "renamed.background": "#ddf4ffff", - "renamed.border": "#ddf4ffff", + "renamed.border": "#54aeff66", "scrollbar.thumb.border": "#ffffff00", "scrollbar.thumb.hover_background": "#f6f8faff", "scrollbar.track.background": "#ffffff00", @@ -506,7 +522,7 @@ "status_bar.background": "#f6f8faff", "success": "#0969daff", "success.background": "#ddf4ffff", - "success.border": "#ddf4ffff", + "success.border": "#54aeff66", "surface.background": "#f6f8faff", "tab.active_background": "#ffffffff", "tab.inactive_background": "#f6f8faff", @@ -837,6 +853,14 @@ "appearance": "light", "name": "Github Light High Contrast", "style": { + "accents": [ + "#006edbff", + "#30a147ff", + "#b88700ff", + "#df0c24ff", + "#ce2c85ff", + "#894cebff" + ], "background.appearance": "opaque", "background": "#ffffffff", "border": "#454c54ff", @@ -851,7 +875,7 @@ "created": "#024c1aff", "created.background": "#d2fedbff", "created.border": "#26a148ff", - "deleted": "#86061dff", + "deleted": "#8a071eff", "deleted.background": "#fff0eeff", "deleted.border": "#ee5a5dff", "drop_target.background": "#dff7ffff", @@ -874,7 +898,7 @@ "element.hover": "#e0e6ebff", "element.selected": "#e0e6ebff", "elevated_surface.background": "#ffffffff", - "error": "#86061dff", + "error": "#8a071eff", "error.background": "#e6eaefff", "error.border": "#454c54ff", "ghost_element.active": "#e0e6ebff", @@ -1252,6 +1276,14 @@ "appearance": "light", "name": "Github Light Tritanopia", "style": { + "accents": [ + "#006edbff", + "#30a147ff", + "#b88700ff", + "#df0c24ff", + "#ce2c85ff", + "#894cebff" + ], "background.appearance": "opaque", "background": "#ffffffff", "border": "#d1d9e0ff", @@ -1667,6 +1699,14 @@ "appearance": "dark", "name": "Github Dark", "style": { + "accents": [ + "#0576ffff", + "#2f6f37ff", + "#895906ff", + "#eb3342ff", + "#d34591ff", + "#975bf1ff" + ], "background.appearance": "opaque", "background": "#0d1117ff", "border": "#3d444dff", @@ -1694,7 +1734,7 @@ "editor.foreground": "#f0f6fcff", "editor.gutter.background": "#0d1117ff", "editor.highlighted_line.background": "#656c7633", - "editor.invisible": "#656c76ff", + "editor.invisible": "#656c7699", "editor.line_number": "#9198a1ff", "editor.subheader.background": "#151b23ff", "editor.wrap_guide": "#3d444db3", @@ -1703,7 +1743,7 @@ "element.disabled": "#212830ff", "element.hover": "#656c7633", "element.selected": "#656c7633", - "elevated_surface.background": "#010409ff", + "elevated_surface.background": "#151b23ff", "error": "#f85149ff", "error.background": "#151b23ff", "error.border": "#3d444db3", @@ -1712,7 +1752,7 @@ "ghost_element.disabled": "#212830ff", "ghost_element.hover": "#656c7633", "ghost_element.selected": "#656c7633", - "hidden": "#656c76ff", + "hidden": "#656c7699", "hidden.background": "#212830ff", "hidden.border": "#656c761a", "hint": "#9198a1ff", @@ -1723,7 +1763,7 @@ "icon.border": "#3d444dff", "icon.accent": "#4493f8ff", "icon.muted": "#9198a1ff", - "icon.disabled": "#656c76ff", + "icon.disabled": "#656c7699", "ignored": "#9198a1ff", "ignored.background": "#212830ff", "ignored.border": "#656c761a", @@ -1786,12 +1826,12 @@ "terminal.foreground": "#f0f6fcff", "text": "#f0f6fcff", "text.accent": "#4493f8ff", - "text.disabled": "#656c76ff", + "text.disabled": "#656c7699", "text.muted": "#f0f6fcff", "text.placeholder": "#9198a1ff", "title_bar.background": "#010409ff", "toolbar.background": "#0d1117ff", - "unreachable": "#656c76ff", + "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", "warning": "#d29922ff", @@ -2082,6 +2122,14 @@ "appearance": "dark", "name": "Github Dark Colorblind", "style": { + "accents": [ + "#0576ffff", + "#2f6f37ff", + "#895906ff", + "#eb3342ff", + "#d34591ff", + "#975bf1ff" + ], "background.appearance": "opaque", "background": "#0d1117ff", "border": "#3d444dff", @@ -2094,9 +2142,9 @@ "conflict.background": "#db6d281a", "conflict.border": "#db6d2866", "created": "#58a6ffff", - "created.background": "#388bfd33", + "created.background": "#388bfd26", "created.border": "#388bfd66", - "deleted": "#f0883eff", + "deleted": "#db6d28ff", "deleted.background": "#db6d281a", "deleted.border": "#db6d2866", "drop_target.background": "#388bfd1a", @@ -2109,7 +2157,7 @@ "editor.foreground": "#f0f6fcff", "editor.gutter.background": "#0d1117ff", "editor.highlighted_line.background": "#656c7633", - "editor.invisible": "#656c76ff", + "editor.invisible": "#656c7699", "editor.line_number": "#9198a1ff", "editor.subheader.background": "#151b23ff", "editor.wrap_guide": "#3d444db3", @@ -2118,8 +2166,8 @@ "element.disabled": "#212830ff", "element.hover": "#656c7633", "element.selected": "#656c7633", - "elevated_surface.background": "#010409ff", - "error": "#f0883eff", + "elevated_surface.background": "#151b23ff", + "error": "#db6d28ff", "error.background": "#151b23ff", "error.border": "#3d444db3", "ghost_element.active": "#656c7633", @@ -2127,7 +2175,7 @@ "ghost_element.disabled": "#212830ff", "ghost_element.hover": "#656c7633", "ghost_element.selected": "#656c7633", - "hidden": "#656c76ff", + "hidden": "#656c7699", "hidden.background": "#212830ff", "hidden.border": "#656c761a", "hint": "#9198a1ff", @@ -2138,7 +2186,7 @@ "icon.border": "#3d444dff", "icon.accent": "#4493f8ff", "icon.muted": "#9198a1ff", - "icon.disabled": "#656c76ff", + "icon.disabled": "#656c7699", "ignored": "#9198a1ff", "ignored.background": "#212830ff", "ignored.border": "#656c761a", @@ -2156,7 +2204,7 @@ "predictive.background": "#656c7633", "predictive.border": "#3d444db3", "renamed": "#58a6ffff", - "renamed.background": "#388bfd33", + "renamed.background": "#388bfd26", "renamed.border": "#388bfd66", "scrollbar.thumb.border": "#00000000", "scrollbar.thumb.hover_background": "#151b23ff", @@ -2165,7 +2213,7 @@ "search.match_background": "#f2cc604d", "status_bar.background": "#010409ff", "success": "#58a6ffff", - "success.background": "#388bfd33", + "success.background": "#388bfd26", "success.border": "#388bfd66", "surface.background": "#010409ff", "tab.active_background": "#0d1117ff", @@ -2201,12 +2249,12 @@ "terminal.foreground": "#f0f6fcff", "text": "#f0f6fcff", "text.accent": "#4493f8ff", - "text.disabled": "#656c76ff", + "text.disabled": "#656c7699", "text.muted": "#f0f6fcff", "text.placeholder": "#9198a1ff", "title_bar.background": "#010409ff", "toolbar.background": "#0d1117ff", - "unreachable": "#656c76ff", + "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", "warning": "#d29922ff", @@ -2497,10 +2545,18 @@ "appearance": "dark", "name": "Github Dark High Contrast", "style": { + "accents": [ + "#0576ffff", + "#2f6f37ff", + "#895906ff", + "#eb3342ff", + "#d34591ff", + "#975bf1ff" + ], "background.appearance": "opaque", "background": "#010409ff", "border": "#b7bdc8ff", - "border.disabled": "#656c761a", + "border.disabled": "#9198a11f", "border.focused": "#409effff", "border.selected": "#409effff", "border.transparent": "#00000000", @@ -2524,7 +2580,7 @@ "editor.foreground": "#ffffffff", "editor.gutter.background": "#010409ff", "editor.highlighted_line.background": "#212830ff", - "editor.invisible": "#656c76ff", + "editor.invisible": "#9198a199", "editor.line_number": "#b7bdc8ff", "editor.subheader.background": "#151b23ff", "editor.wrap_guide": "#b7bdc8ff", @@ -2533,7 +2589,7 @@ "element.disabled": "#262c36ff", "element.hover": "#212830ff", "element.selected": "#212830ff", - "elevated_surface.background": "#010409ff", + "elevated_surface.background": "#151b23ff", "error": "#ff9492ff", "error.background": "#151b23ff", "error.border": "#b7bdc8ff", @@ -2542,9 +2598,9 @@ "ghost_element.disabled": "#262c36ff", "ghost_element.hover": "#212830ff", "ghost_element.selected": "#212830ff", - "hidden": "#656c76ff", + "hidden": "#9198a199", "hidden.background": "#262c36ff", - "hidden.border": "#656c761a", + "hidden.border": "#9198a11f", "hint": "#b7bdc8ff", "hint.background": "#151b23ff", "hint.border": "#b7bdc8ff", @@ -2553,10 +2609,10 @@ "icon.border": "#b7bdc8ff", "icon.accent": "#74b9ffff", "icon.muted": "#b7bdc8ff", - "icon.disabled": "#656c76ff", + "icon.disabled": "#9198a199", "ignored": "#b7bdc8ff", "ignored.background": "#262c36ff", - "ignored.border": "#656c761a", + "ignored.border": "#9198a11f", "info": "#f0b72fff", "info.background": "#151b23ff", "info.border": "#b7bdc8ff", @@ -2616,14 +2672,14 @@ "terminal.foreground": "#ffffffff", "text": "#ffffffff", "text.accent": "#74b9ffff", - "text.disabled": "#656c76ff", + "text.disabled": "#9198a199", "text.muted": "#ffffffff", "text.placeholder": "#b7bdc8ff", "title_bar.background": "#010409ff", "toolbar.background": "#010409ff", - "unreachable": "#656c76ff", + "unreachable": "#9198a199", "unreachable.background": "#262c36ff", - "unreachable.border": "#656c761a", + "unreachable.border": "#9198a11f", "warning": "#f0b72fff", "warning.background": "#151b23ff", "warning.border": "#b7bdc8ff", @@ -2912,6 +2968,14 @@ "appearance": "dark", "name": "Github Dark Tritanopia", "style": { + "accents": [ + "#0576ffff", + "#2f6f37ff", + "#895906ff", + "#eb3342ff", + "#d34591ff", + "#975bf1ff" + ], "background.appearance": "opaque", "background": "#0d1117ff", "border": "#3d444dff", @@ -2939,7 +3003,7 @@ "editor.foreground": "#f0f6fcff", "editor.gutter.background": "#0d1117ff", "editor.highlighted_line.background": "#656c7633", - "editor.invisible": "#656c76ff", + "editor.invisible": "#656c7699", "editor.line_number": "#9198a1ff", "editor.subheader.background": "#151b23ff", "editor.wrap_guide": "#3d444db3", @@ -2948,7 +3012,7 @@ "element.disabled": "#212830ff", "element.hover": "#656c7633", "element.selected": "#656c7633", - "elevated_surface.background": "#010409ff", + "elevated_surface.background": "#151b23ff", "error": "#f85149ff", "error.background": "#151b23ff", "error.border": "#3d444db3", @@ -2957,7 +3021,7 @@ "ghost_element.disabled": "#212830ff", "ghost_element.hover": "#656c7633", "ghost_element.selected": "#656c7633", - "hidden": "#656c76ff", + "hidden": "#656c7699", "hidden.background": "#212830ff", "hidden.border": "#656c761a", "hint": "#9198a1ff", @@ -2968,7 +3032,7 @@ "icon.border": "#3d444dff", "icon.accent": "#4493f8ff", "icon.muted": "#9198a1ff", - "icon.disabled": "#656c76ff", + "icon.disabled": "#656c7699", "ignored": "#9198a1ff", "ignored.background": "#212830ff", "ignored.border": "#656c761a", @@ -3031,12 +3095,12 @@ "terminal.foreground": "#f0f6fcff", "text": "#f0f6fcff", "text.accent": "#4493f8ff", - "text.disabled": "#656c76ff", + "text.disabled": "#656c7699", "text.muted": "#f0f6fcff", "text.placeholder": "#9198a1ff", "title_bar.background": "#010409ff", "toolbar.background": "#0d1117ff", - "unreachable": "#656c76ff", + "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", "warning": "#d29922ff", @@ -3327,6 +3391,14 @@ "appearance": "dark", "name": "Github Dark Dimmed", "style": { + "accents": [ + "#0576ffff", + "#2f6f37ff", + "#895906ff", + "#eb3342ff", + "#d34591ff", + "#975bf1ff" + ], "background.appearance": "opaque", "background": "#212830ff", "border": "#3d444dff", From 5ffc375b95c1f6b743cfdc3340ee340a18f83191 Mon Sep 17 00:00:00 2001 From: Clay Tercek <30105080+claytercek@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:10:42 -0500 Subject: [PATCH 2/3] add vim mode colors --- src/theme.js | 12 ++++++ themes/github_theme.json | 81 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/src/theme.js b/src/theme.js index d6da613..24c95a8 100644 --- a/src/theme.js +++ b/src/theme.js @@ -230,6 +230,18 @@ export function getTheme({ themeKey, name, type }) { "unreachable.background": tokens['bgColor/disabled'], "unreachable.border": tokens['borderColor/disabled'], + // Using functional tokens as they have sufficient contrast for colorblindness + // themes, even though they don't really match the functional intent here. + "vim.mode.text": tokens['fgColor/default'], + "vim.normal.background": tokens['bgColor/neutral-emphasis'], + "vim.helix_normal.background": tokens['bgColor/neutral-emphasis'], + "vim.visual.background": tokens['bgColor/accent-emphasis'], + "vim.helix_select.background": tokens['bgColor/accent-emphasis'], + "vim.insert.background": tokens['bgColor/success-emphasis'], + "vim.visual_line.background": tokens['bgColor/accent-emphasis'], + "vim.visual_block.background": tokens['bgColor/done-emphasis'], + "vim.replace.background": tokens['bgColor/sponsors-emphasis'], + "warning": tokens['fgColor/attention'], "warning.background": tokens['bgColor/muted'], "warning.border": tokens['borderColor/muted'], diff --git a/themes/github_theme.json b/themes/github_theme.json index 7345e2b..be65213 100644 --- a/themes/github_theme.json +++ b/themes/github_theme.json @@ -142,6 +142,15 @@ "unreachable": "#818b98ff", "unreachable.background": "#eff2f5ff", "unreachable.border": "#818b981a", + "vim.mode.text": "#1f2328ff", + "vim.normal.background": "#59636eff", + "vim.helix_normal.background": "#59636eff", + "vim.visual.background": "#0969daff", + "vim.helix_select.background": "#0969daff", + "vim.insert.background": "#1f883dff", + "vim.visual_line.background": "#0969daff", + "vim.visual_block.background": "#8250dfff", + "vim.replace.background": "#bf3989ff", "warning": "#9a6700ff", "warning.background": "#f6f8faff", "warning.border": "#d1d9e0b3", @@ -565,6 +574,15 @@ "unreachable": "#818b98ff", "unreachable.background": "#eff2f5ff", "unreachable.border": "#818b981a", + "vim.mode.text": "#1f2328ff", + "vim.normal.background": "#59636eff", + "vim.helix_normal.background": "#59636eff", + "vim.visual.background": "#0969daff", + "vim.helix_select.background": "#0969daff", + "vim.insert.background": "#0969daff", + "vim.visual_line.background": "#0969daff", + "vim.visual_block.background": "#8250dfff", + "vim.replace.background": "#bf3989ff", "warning": "#9a6700ff", "warning.background": "#f6f8faff", "warning.border": "#d1d9e0b3", @@ -988,6 +1006,15 @@ "unreachable": "#59636eff", "unreachable.background": "#e0e6ebff", "unreachable.border": "#59636e1f", + "vim.mode.text": "#010409ff", + "vim.normal.background": "#454c54ff", + "vim.helix_normal.background": "#454c54ff", + "vim.visual.background": "#0349b4ff", + "vim.helix_select.background": "#0349b4ff", + "vim.insert.background": "#055d20ff", + "vim.visual_line.background": "#0349b4ff", + "vim.visual_block.background": "#622cbcff", + "vim.replace.background": "#971368ff", "warning": "#603700ff", "warning.background": "#e6eaefff", "warning.border": "#454c54ff", @@ -1411,6 +1438,15 @@ "unreachable": "#818b98ff", "unreachable.background": "#eff2f5ff", "unreachable.border": "#818b981a", + "vim.mode.text": "#1f2328ff", + "vim.normal.background": "#59636eff", + "vim.helix_normal.background": "#59636eff", + "vim.visual.background": "#0969daff", + "vim.helix_select.background": "#0969daff", + "vim.insert.background": "#0969daff", + "vim.visual_line.background": "#0969daff", + "vim.visual_block.background": "#8250dfff", + "vim.replace.background": "#bf3989ff", "warning": "#9a6700ff", "warning.background": "#f6f8faff", "warning.border": "#d1d9e0b3", @@ -1834,6 +1870,15 @@ "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", + "vim.mode.text": "#f0f6fcff", + "vim.normal.background": "#656c76ff", + "vim.helix_normal.background": "#656c76ff", + "vim.visual.background": "#1f6febff", + "vim.helix_select.background": "#1f6febff", + "vim.insert.background": "#238636ff", + "vim.visual_line.background": "#1f6febff", + "vim.visual_block.background": "#8957e5ff", + "vim.replace.background": "#bf4b8aff", "warning": "#d29922ff", "warning.background": "#151b23ff", "warning.border": "#3d444db3", @@ -2257,6 +2302,15 @@ "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", + "vim.mode.text": "#f0f6fcff", + "vim.normal.background": "#656c76ff", + "vim.helix_normal.background": "#656c76ff", + "vim.visual.background": "#1f6febff", + "vim.helix_select.background": "#1f6febff", + "vim.insert.background": "#1f6febff", + "vim.visual_line.background": "#1f6febff", + "vim.visual_block.background": "#8957e5ff", + "vim.replace.background": "#bf4b8aff", "warning": "#d29922ff", "warning.background": "#151b23ff", "warning.border": "#3d444db3", @@ -2680,6 +2734,15 @@ "unreachable": "#9198a199", "unreachable.background": "#262c36ff", "unreachable.border": "#9198a11f", + "vim.mode.text": "#ffffffff", + "vim.normal.background": "#3d444dff", + "vim.helix_normal.background": "#3d444dff", + "vim.visual.background": "#194fb1ff", + "vim.helix_select.background": "#194fb1ff", + "vim.insert.background": "#006222ff", + "vim.visual_line.background": "#194fb1ff", + "vim.visual_block.background": "#6921d7ff", + "vim.replace.background": "#9c1d6aff", "warning": "#f0b72fff", "warning.background": "#151b23ff", "warning.border": "#b7bdc8ff", @@ -3103,6 +3166,15 @@ "unreachable": "#656c7699", "unreachable.background": "#212830ff", "unreachable.border": "#656c761a", + "vim.mode.text": "#f0f6fcff", + "vim.normal.background": "#656c76ff", + "vim.helix_normal.background": "#656c76ff", + "vim.visual.background": "#1f6febff", + "vim.helix_select.background": "#1f6febff", + "vim.insert.background": "#1f6febff", + "vim.visual_line.background": "#1f6febff", + "vim.visual_block.background": "#8957e5ff", + "vim.replace.background": "#bf4b8aff", "warning": "#d29922ff", "warning.background": "#151b23ff", "warning.border": "#3d444db3", @@ -3526,6 +3598,15 @@ "unreachable": "#656c76ff", "unreachable.background": "#2a313cff", "unreachable.border": "#656c761a", + "vim.mode.text": "#d1d7e0ff", + "vim.normal.background": "#656c76ff", + "vim.helix_normal.background": "#656c76ff", + "vim.visual.background": "#316dcaff", + "vim.helix_select.background": "#316dcaff", + "vim.insert.background": "#347d39ff", + "vim.visual_line.background": "#316dcaff", + "vim.visual_block.background": "#8256d0ff", + "vim.replace.background": "#ae4c82ff", "warning": "#c69026ff", "warning.background": "#262c36ff", "warning.border": "#3d444db3", From 645b09281e6315ed01e9a7eda90450950a9b61d9 Mon Sep 17 00:00:00 2001 From: Clay Tercek <30105080+claytercek@users.noreply.github.com> Date: Tue, 25 Nov 2025 11:54:11 -0500 Subject: [PATCH 3/3] add better colorblindness support for players and accents --- src/theme.js | 53 ++++--- themes/github_theme.json | 314 +++++++++++---------------------------- 2 files changed, 121 insertions(+), 246 deletions(-) diff --git a/src/theme.js b/src/theme.js index 24c95a8..d06ae62 100644 --- a/src/theme.js +++ b/src/theme.js @@ -55,18 +55,44 @@ export function getTheme({ themeKey, name, type }) { return '#' + color; } + let spectrum = [ + "blue", + "green", + "yellow", + "red", + "pink", + "purple", + ]; + + if (themeKey.includes('colorblind')) { + // protonopia and deuteranopia friendly spectrum + // TODO: these colors were determined by simulating colorblindness digitally + // and picking colors that were more easily distinguishable. A more + // thorough approach with input from colorblind users would be better. + spectrum = [ + "blue", + "cyan", + "yellow", + "pink", + ]; + } else if (themeKey.includes('tritanopia')) { + // tritanopia friendly spectrum + // TODO: these colors were determined by simulating colorblindness digitally + // and picking colors that were more easily distinguishable. A more + // thorough approach with input from colorblind users would be better. + spectrum = [ + "teal", + "yellow", + "purple", + "pink", + ]; + } + return { appearance: type, name, style: { - accents: [ - "blue", - "green", - "yellow", - "red", - "pink", - "purple", - ].map(color => tokens[`data/${color}/color/emphasis`]), + accents: spectrum.map(color => tokens[`data/${color}/color/emphasis`]), "background.appearance": "opaque", @@ -247,16 +273,7 @@ export function getTheme({ themeKey, name, type }) { "warning.border": tokens['borderColor/muted'], "players": - [ - "blue", - "orange", - "pink", - "green", - "purple", - "yellow", - "teal", - "red" - ].map(color => ({ + spectrum.map(color => ({ "cursor": tokens[`data/${color}/color/emphasis`], "background": tokens[`data/${color}/color/emphasis`], "selection": alpha(`data/${color}/color/emphasis`, 0.4) diff --git a/themes/github_theme.json b/themes/github_theme.json index be65213..6375dc7 100644 --- a/themes/github_theme.json +++ b/themes/github_theme.json @@ -160,40 +160,30 @@ "background": "#006edbff", "selection": "#006edb66" }, - { - "cursor": "#eb670fff", - "background": "#eb670fff", - "selection": "#eb670f66" - }, - { - "cursor": "#ce2c85ff", - "background": "#ce2c85ff", - "selection": "#ce2c8566" - }, { "cursor": "#30a147ff", "background": "#30a147ff", "selection": "#30a14766" }, - { - "cursor": "#894cebff", - "background": "#894cebff", - "selection": "#894ceb66" - }, { "cursor": "#b88700ff", "background": "#b88700ff", "selection": "#b8870066" }, - { - "cursor": "#179b9bff", - "background": "#179b9bff", - "selection": "#179b9b66" - }, { "cursor": "#df0c24ff", "background": "#df0c24ff", "selection": "#df0c2466" + }, + { + "cursor": "#ce2c85ff", + "background": "#ce2c85ff", + "selection": "#ce2c8566" + }, + { + "cursor": "#894cebff", + "background": "#894cebff", + "selection": "#894ceb66" } ], "syntax": { @@ -441,11 +431,9 @@ "style": { "accents": [ "#006edbff", - "#30a147ff", + null, "#b88700ff", - "#df0c24ff", - "#ce2c85ff", - "#894cebff" + "#ce2c85ff" ], "background.appearance": "opaque", "background": "#ffffffff", @@ -593,24 +581,7 @@ "selection": "#006edb66" }, { - "cursor": "#eb670fff", - "background": "#eb670fff", - "selection": "#eb670f66" - }, - { - "cursor": "#ce2c85ff", - "background": "#ce2c85ff", - "selection": "#ce2c8566" - }, - { - "cursor": "#30a147ff", - "background": "#30a147ff", - "selection": "#30a14766" - }, - { - "cursor": "#894cebff", - "background": "#894cebff", - "selection": "#894ceb66" + "selection": null }, { "cursor": "#b88700ff", @@ -618,14 +589,9 @@ "selection": "#b8870066" }, { - "cursor": "#179b9bff", - "background": "#179b9bff", - "selection": "#179b9b66" - }, - { - "cursor": "#df0c24ff", - "background": "#df0c24ff", - "selection": "#df0c2466" + "cursor": "#ce2c85ff", + "background": "#ce2c85ff", + "selection": "#ce2c8566" } ], "syntax": { @@ -1024,40 +990,30 @@ "background": "#006edbff", "selection": "#006edb66" }, - { - "cursor": "#eb670fff", - "background": "#eb670fff", - "selection": "#eb670f66" - }, - { - "cursor": "#ce2c85ff", - "background": "#ce2c85ff", - "selection": "#ce2c8566" - }, { "cursor": "#30a147ff", "background": "#30a147ff", "selection": "#30a14766" }, - { - "cursor": "#894cebff", - "background": "#894cebff", - "selection": "#894ceb66" - }, { "cursor": "#b88700ff", "background": "#b88700ff", "selection": "#b8870066" }, - { - "cursor": "#179b9bff", - "background": "#179b9bff", - "selection": "#179b9b66" - }, { "cursor": "#df0c24ff", "background": "#df0c24ff", "selection": "#df0c2466" + }, + { + "cursor": "#ce2c85ff", + "background": "#ce2c85ff", + "selection": "#ce2c8566" + }, + { + "cursor": "#894cebff", + "background": "#894cebff", + "selection": "#894ceb66" } ], "syntax": { @@ -1304,12 +1260,10 @@ "name": "Github Light Tritanopia", "style": { "accents": [ - "#006edbff", - "#30a147ff", + "#179b9bff", "#b88700ff", - "#df0c24ff", - "#ce2c85ff", - "#894cebff" + "#894cebff", + "#ce2c85ff" ], "background.appearance": "opaque", "background": "#ffffffff", @@ -1452,29 +1406,9 @@ "warning.border": "#d1d9e0b3", "players": [ { - "cursor": "#006edbff", - "background": "#006edbff", - "selection": "#006edb66" - }, - { - "cursor": "#eb670fff", - "background": "#eb670fff", - "selection": "#eb670f66" - }, - { - "cursor": "#ce2c85ff", - "background": "#ce2c85ff", - "selection": "#ce2c8566" - }, - { - "cursor": "#30a147ff", - "background": "#30a147ff", - "selection": "#30a14766" - }, - { - "cursor": "#894cebff", - "background": "#894cebff", - "selection": "#894ceb66" + "cursor": "#179b9bff", + "background": "#179b9bff", + "selection": "#179b9b66" }, { "cursor": "#b88700ff", @@ -1482,14 +1416,14 @@ "selection": "#b8870066" }, { - "cursor": "#179b9bff", - "background": "#179b9bff", - "selection": "#179b9b66" + "cursor": "#894cebff", + "background": "#894cebff", + "selection": "#894ceb66" }, { - "cursor": "#df0c24ff", - "background": "#df0c24ff", - "selection": "#df0c2466" + "cursor": "#ce2c85ff", + "background": "#ce2c85ff", + "selection": "#ce2c8566" } ], "syntax": { @@ -1888,40 +1822,30 @@ "background": "#0576ffff", "selection": "#0576ff66" }, - { - "cursor": "#984b10ff", - "background": "#984b10ff", - "selection": "#984b1066" - }, - { - "cursor": "#d34591ff", - "background": "#d34591ff", - "selection": "#d3459166" - }, { "cursor": "#2f6f37ff", "background": "#2f6f37ff", "selection": "#2f6f3766" }, - { - "cursor": "#975bf1ff", - "background": "#975bf1ff", - "selection": "#975bf166" - }, { "cursor": "#895906ff", "background": "#895906ff", "selection": "#89590666" }, - { - "cursor": "#106c70ff", - "background": "#106c70ff", - "selection": "#106c7066" - }, { "cursor": "#eb3342ff", "background": "#eb3342ff", "selection": "#eb334266" + }, + { + "cursor": "#d34591ff", + "background": "#d34591ff", + "selection": "#d3459166" + }, + { + "cursor": "#975bf1ff", + "background": "#975bf1ff", + "selection": "#975bf166" } ], "syntax": { @@ -2169,11 +2093,9 @@ "style": { "accents": [ "#0576ffff", - "#2f6f37ff", + null, "#895906ff", - "#eb3342ff", - "#d34591ff", - "#975bf1ff" + "#d34591ff" ], "background.appearance": "opaque", "background": "#0d1117ff", @@ -2321,24 +2243,7 @@ "selection": "#0576ff66" }, { - "cursor": "#984b10ff", - "background": "#984b10ff", - "selection": "#984b1066" - }, - { - "cursor": "#d34591ff", - "background": "#d34591ff", - "selection": "#d3459166" - }, - { - "cursor": "#2f6f37ff", - "background": "#2f6f37ff", - "selection": "#2f6f3766" - }, - { - "cursor": "#975bf1ff", - "background": "#975bf1ff", - "selection": "#975bf166" + "selection": null }, { "cursor": "#895906ff", @@ -2346,14 +2251,9 @@ "selection": "#89590666" }, { - "cursor": "#106c70ff", - "background": "#106c70ff", - "selection": "#106c7066" - }, - { - "cursor": "#eb3342ff", - "background": "#eb3342ff", - "selection": "#eb334266" + "cursor": "#d34591ff", + "background": "#d34591ff", + "selection": "#d3459166" } ], "syntax": { @@ -2752,40 +2652,30 @@ "background": "#0576ffff", "selection": "#0576ff66" }, - { - "cursor": "#984b10ff", - "background": "#984b10ff", - "selection": "#984b1066" - }, - { - "cursor": "#d34591ff", - "background": "#d34591ff", - "selection": "#d3459166" - }, { "cursor": "#2f6f37ff", "background": "#2f6f37ff", "selection": "#2f6f3766" }, - { - "cursor": "#975bf1ff", - "background": "#975bf1ff", - "selection": "#975bf166" - }, { "cursor": "#895906ff", "background": "#895906ff", "selection": "#89590666" }, - { - "cursor": "#106c70ff", - "background": "#106c70ff", - "selection": "#106c7066" - }, { "cursor": "#eb3342ff", "background": "#eb3342ff", "selection": "#eb334266" + }, + { + "cursor": "#d34591ff", + "background": "#d34591ff", + "selection": "#d3459166" + }, + { + "cursor": "#975bf1ff", + "background": "#975bf1ff", + "selection": "#975bf166" } ], "syntax": { @@ -3032,12 +2922,10 @@ "name": "Github Dark Tritanopia", "style": { "accents": [ - "#0576ffff", - "#2f6f37ff", + "#106c70ff", "#895906ff", - "#eb3342ff", - "#d34591ff", - "#975bf1ff" + "#975bf1ff", + "#d34591ff" ], "background.appearance": "opaque", "background": "#0d1117ff", @@ -3180,29 +3068,9 @@ "warning.border": "#3d444db3", "players": [ { - "cursor": "#0576ffff", - "background": "#0576ffff", - "selection": "#0576ff66" - }, - { - "cursor": "#984b10ff", - "background": "#984b10ff", - "selection": "#984b1066" - }, - { - "cursor": "#d34591ff", - "background": "#d34591ff", - "selection": "#d3459166" - }, - { - "cursor": "#2f6f37ff", - "background": "#2f6f37ff", - "selection": "#2f6f3766" - }, - { - "cursor": "#975bf1ff", - "background": "#975bf1ff", - "selection": "#975bf166" + "cursor": "#106c70ff", + "background": "#106c70ff", + "selection": "#106c7066" }, { "cursor": "#895906ff", @@ -3210,14 +3078,14 @@ "selection": "#89590666" }, { - "cursor": "#106c70ff", - "background": "#106c70ff", - "selection": "#106c7066" + "cursor": "#975bf1ff", + "background": "#975bf1ff", + "selection": "#975bf166" }, { - "cursor": "#eb3342ff", - "background": "#eb3342ff", - "selection": "#eb334266" + "cursor": "#d34591ff", + "background": "#d34591ff", + "selection": "#d3459166" } ], "syntax": { @@ -3616,40 +3484,30 @@ "background": "#0576ffff", "selection": "#0576ff66" }, - { - "cursor": "#984b10ff", - "background": "#984b10ff", - "selection": "#984b1066" - }, - { - "cursor": "#d34591ff", - "background": "#d34591ff", - "selection": "#d3459166" - }, { "cursor": "#2f6f37ff", "background": "#2f6f37ff", "selection": "#2f6f3766" }, - { - "cursor": "#975bf1ff", - "background": "#975bf1ff", - "selection": "#975bf166" - }, { "cursor": "#895906ff", "background": "#895906ff", "selection": "#89590666" }, - { - "cursor": "#106c70ff", - "background": "#106c70ff", - "selection": "#106c7066" - }, { "cursor": "#eb3342ff", "background": "#eb3342ff", "selection": "#eb334266" + }, + { + "cursor": "#d34591ff", + "background": "#d34591ff", + "selection": "#d3459166" + }, + { + "cursor": "#975bf1ff", + "background": "#975bf1ff", + "selection": "#975bf166" } ], "syntax": {