LightCattac
A warm light theme for Visual Studio Code, built for long reading sessions:
- Pure black code text on a warm off-white background (
#f3f0e9), 18.5:1 contrast.
- Every code syntax colour reaches at least 7:1 contrast (WCAG AAA) against the editor background. Only Markdown links, quotes and list markers are deliberately softer, at 5.6:1.
- Syntax colours from Modus Operandi Tinted, re-solved for this background so each colour keeps its original hue, chroma and contrast ratio.
- Quiet workbench: sidebar, panel and status bar share one slightly darker surface; a single terracotta accent (
#a33f14) marks the cursor, focus and active items.
Syntax palette
| Role |
Colour |
Contrast |
| Keywords |
#002d9f |
9.8:1 |
| Types |
#2c5b09 |
7.1:1 |
| Strings |
#005484 |
7.1:1 |
| Constants, enum members, macros |
#4f12b1 |
9.0:1 |
| Function calls |
#763f58 |
7.0:1 |
| Function definitions |
#5b2434 |
10.6:1 |
| Library functions |
#6d0840 |
10.5:1 |
| Preprocessor directives |
#823d00 |
7.1:1 |
| Variable and property declarations, JSON keys |
#005b3c |
7.2:1 |
| Escape sequences |
#87006f |
8.2:1 |
| Comments |
#770000 |
10.3:1 |
| Documentation comments |
#2c3f5e |
9.3:1 |
| Variables, numbers, operators, punctuation |
#000000 |
18.5:1 |
As in Modus Operandi, numbers, operators, punctuation and brackets use the main text colour, and code uses no bold or italic.
Notes
- Declarations need semantic highlighting. Function definitions and variable declarations get their own colours only when the language server reports a
declaration modifier (for example TypeScript). The Microsoft C/C++ extension does not, so in C++ function definitions show the function-call colour and variable declarations stay black.
- Bracket pair colourisation shows black brackets, following the Modus Operandi convention.
Rebuilding the theme
The theme file is generated. The palette is defined in OKLCH and each text colour is solved from its target contrast ratio, so changing the background in tools/gen.py updates every surface and text colour with it.
python tools/gen.py themes/lightcattac-color-theme.json # write the theme
python tools/gen.py # print the palette with contrast ratios
Credits
The syntax colour assignments and base colours are adapted from Modus Operandi Tinted, part of the Modus Themes by Protesilaos Stavrou (copyright Free Software Foundation, Inc.), distributed under the GNU General Public License version 3 or later.
License
LightCattac is licensed under the GNU General Public License v3.0 or later. The full text is in the LICENSE file.