Most themes paint everything. Living Code starts from a gray editor and adds color one job at a time. Scroll, and watch this file get its colors.Scroll to add color, one role at a time.
night.ts
1// Fails the build when a text role drops below AA.2import{contrast}from"./color.mjs";3H4constAA=4.5;Used once5letchecked=0;67@flavor("night")8exportclassNightextendsFlavor{9ground=[0.13,0.01,240];1011check(role:Role,min=AA){E12constratio=contrast(this.colour(role),this.ground);No property colourI13if(ratio<min)thrownewError("below AA: "+role);Runs at build time14checked+=1;W15returntrue;Always true16}17}
NORMALslate only+ structure+ data4 diagnostics
//fn
Start from slate.
Background, panels, selection and comments share one hue at almost no chroma. Only the lightness steps, so nothing behind the code competes with it.
A minimal variant of Night with a single accent. Teal marks keywords, tags and focus; everything else stays on the slate ramp. No warm literals or multicolor diagnostics.
No port for “” yet. Any app can still follow the theme: read palette.json or map the semantic roles onto its color slots.
A few things before you switch.
Which flavor should I start with?
Night, unless you have a reason not to. It is the default: dark slate and the full palette. Frost takes a third of the chroma out for long sessions, Paper is for daylight, and Signal keeps one accent and lets slate do the rest. Try them above and this page repaints.
Does every port include all four flavors?
51 of 53 do. Both browser themes ship Night and Paper only: a browser theme colors little more than backgrounds, borders and one accent, so Frost and Signal would look like Night there. Each port's page lists the flavors it ships.
Do I need to clone the repository?
No. Each app installs the way it normally installs things: from its marketplace or built-in theme list where one exists, otherwise with one command you copy from the port's page.
What do the contrast checks cover?
Every color used for text: the foreground, the syntax roles, diagnostics, links and the active line number, 24 roles in all. The build fails if any of them drops below 4.5:1 (WCAG AA) against its flavor's background. Colors that are not text, such as borders, selection and inactive line numbers, are not held to it.
You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.