Skip to content

Add protanopia/tritanopia variants for all remaining ports - #12

Merged
bruschill merged 1 commit into
mainfrom
colorblind-safe-all-ports
Jul 12, 2026
Merged

Add protanopia/tritanopia variants for all remaining ports#12
bruschill merged 1 commit into
mainfrom
colorblind-safe-all-ports

Conversation

@bruschill

Copy link
Copy Markdown
Owner

What

Follow-up to #11, which added colorblind-safe Vim variants. This extends the same two variants — protanopia (red-blindness) and tritanopia (blue-blindness) — to every remaining port.

Each port now ships madeofcode-protan.* and madeofcode-tritan.* beside its base theme:

Category Ports
Editors JetBrains (.icls + .theme.json), Sublime (.sublime-color-scheme + .tmTheme), VS Code, Zed, Helix, Xcode, Eclipse
Terminals kitty, Ghostty, Alacritty, iTerm2, Windows Terminal
Tools Pi
Web highlight.js, Prism, Shiki

36 new files across 16 ports.

How

All ports build from the same fixed source palette, so the variants are generated by applying the same source-hex → variant-hex remap used for the Vim schemes in #11 — a source color always becomes the same variant color everywhere, keeping the colorblind-safe choices consistent across editors, terminals, and tools.

Generation is format-aware:

  • Hex-string formats (toml, conf, css, json, xml, plain) — direct hex remap, case-insensitive, alpha suffixes preserved.
  • iTerm2 .itermcolors — plist float components (Red/Green/Blue Component) parsed, matched to source hex, rewritten as floats.
  • Xcode .xccolortheme — space-separated float color strings parsed and rewritten in the same 6-significant-figure style.

Beyond syntax tokens, this also remaps the pieces that carry meaning through color:

  • Terminal ANSI palettes — the 16-color slots follow their base hue's treatment (e.g. the red slot becomes amber under protanopia).
  • Editor status backgrounds — error/removed (red), warning (yellow), info/modified (blue), added (green) backgrounds are remapped so state stays distinguishable.

Verification

  • 0 source-accent hexes leaked into any variant file (checked programmatically).
  • All 12 variant JSON files re-parse; all 4 variant plists pass plutil -lint.
  • iTerm2/Xcode float round-trips spot-checked (e.g. amber #ffc21f → R 1.0, G 0.7607843137, B 0.1215686275).
  • VS Code variants registered in vscode/package.json contributes.themes so they show as madeofcode protan / madeofcode tritan in the picker.

Docs

README updated: the Vim Colorblind-safe variants note now points out every port ships the two variants, and the Accessibility section states the remap is applied across all ports (including ANSI palettes and status backgrounds).

Notes

The JetBrains plugin zip/jar artifacts are intentionally not rebuilt here — the variant .icls files can be imported directly via Import Scheme…, consistent with the repo convention of not committing regenerated packaging artifacts.

Extend the colorblind-safe Vim variants (PR #11) to every other port:
alacritty, eclipse, ghostty, helix, iterm2, jetbrains (icls + theme.json),
kitty, pi, sublime (color-scheme + tmTheme), vscode, web (highlight.js,
prism, shiki), windows-terminal, xcode, and zed.

Each ships a madeofcode-protan.* and madeofcode-tritan.* beside its base
theme, generated by applying the same source-palette remap used for Vim so
the colorblind-safe choices stay consistent across editors, terminals, and
tools. Terminal ANSI palettes and editor status-message backgrounds
(error/warning/info/added) are remapped to follow their hue's treatment.

Format-aware generation: hex string formats remapped directly; iTerm2 and
Xcode plists converted via their float components; plists re-validated with
plutil and all JSON re-parsed. VS Code variants registered in package.json
so they appear in the theme picker.
@bruschill
bruschill merged commit bef6ebe into main Jul 12, 2026
@bruschill
bruschill deleted the colorblind-safe-all-ports branch July 12, 2026 22:19
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.

1 participant