Convert ANSI terminal color palettes (16 colors per palette, 12 palettes) to .xccolortheme files for Xcode.
This generator reads ANSI terminal palettes (16 colors each, 12 palettes) defined in
colors.md and produces Xcode
.xccolortheme files. Each palette maps to 24 Xcode syntax
tokens (keywords, strings, comments, types, etc.) so that the editor's
syntax highlighting matches the terminal color scheme.
Canonical themes live in themes/.
When the source palette changes, run the generator to rebuild them into
labs/dist/.
| Theme | Background | Type |
|---|---|---|
| X | #050505 | dark |
| Madrid | #fafafa | light |
| Lahabana | #19191a | dark |
| Miami | #000000 | dark |
| Paris | #1a0a30 | dark |
| Tokio | #1c1c1d | dark |
| Oslo | #3f4451 | dark |
| Helsinki | #f8fafe | light |
| Berlin | #000000 | dark (monochrome) |
| London | #ffffff | light (monochrome) |
| Praha | #1a1a1a | dark |
| Bogota | #200b0a | dark |
cd labs
python3 generate_themes.pyAll .xccolortheme files are written to labs/dist/. Once tested, promote them to themes/ if desired.
from labs.generate_themes import make_theme, THEMES, SYNTAX_MAP
theme = THEMES["Praha"]
colors = make_theme("Praha", theme)./install.sh # install all themes
./install.sh Praha # install a single themeREPO="xscriptor/xcode" bash <(curl -fsSL https://raw.githubusercontent.com/xscriptor/xcode/main/install.sh)Install a single theme remotely:
REPO="xscriptor/xcode" bash <(curl -fsSL https://raw.githubusercontent.com/xscriptor/xcode/main/install.sh) -s Praha./install.sh -u # local uninstall
REPO="xscriptor/xcode" bash <(curl -fsSL ...) -s -- -u # remote uninstallThis removes any theme file matching the known theme names from ~/Library/Developer/Xcode/UserData/FontAndColorThemes/.
After installation, restart Xcode and select the theme from Xcode > Preferences > Themes.
- colors.md
- CONTRIBUTING.md
- SECURITY.md
- CODE_OF_CONDUCT.md
- docs/color-mapping.md
- labs/README.md
- labs/README.md