The Coral Theme — Palette, Contrast and CSS Variables
The Coral theme is five colours, not thirty: a page wash, an editor surface, a tint for chrome, an accent for keywords and one text colour that has to sit legibly on all three surfaces. The table below turns the palette into the numbers you actually need when re-implementing it — channels, hue and, most importantly, contrast against each surface.
Palette in every notation
| Token | HEX | RGB | HSL |
|---|---|---|---|
| Background | #FDEBDD | rgb(253, 235, 221) | hsl(26, 89%, 93%) |
| Editor | #FFFAF5 | rgb(255, 250, 245) | hsl(30, 100%, 98%) |
| Tint | #FBE3D2 | rgb(251, 227, 210) | hsl(25, 84%, 90%) |
| Accent | #D65A31 | rgb(214, 90, 49) | hsl(15, 67%, 52%) |
| Text | #3A2A22 | rgb(58, 42, 34) | hsl(20, 26%, 18%) |
Contrast on each surface
Ratios use the WCAG 2.1 relative-luminance definition (sRGB gamma linearisation, 0.2126 / 0.7152 / 0.0722 weights). AA wants 4.5:1 for body text and 3:1 for large text; AAA raises those to 7:1 and 4.5:1.
| Pair | Ratio | AA text | AA large | AAA text |
|---|---|---|---|---|
| Text on background | 11.80:1 | pass | pass | pass |
| Text on editor | 13.20:1 | pass | pass | pass |
| Text on tint | 11.09:1 | pass | pass | pass |
| Accent on editor | 3.77:1 | fail | pass | fail |
Copy-paste tokens
:root {
--snippet-bg: #fdebdd;
--snippet-editor: #fffaf5;
--snippet-tint: #fbe3d2;
--snippet-accent: #d65a31;
--snippet-text: #3a2a22;
}
What this palette is good for
A terracotta accent on a peach wash, made for launch slides where the code sits beside a brand colour and should not compete with it.
Other themes
Frequently asked questions
Does the Coral text colour pass WCAG on every surface?
Against the editor surface it measures 13.20:1 and against the page background 11.80:1. AA for body text needs 4.5:1, so the pair that matters for a code screenshot — text on editor — is comfortably above the bar.
Can I reuse these values in my own syntax theme?
Yes, and the copy block above is written as CSS custom properties for that reason. Map background to your editor canvas, editor to the code area, accent to keywords and text to identifiers. Because the palette is light-first, invert the two surfaces rather than the text colour if you need a dark variant.
Render your own snippet in this palette with the Code2Image code to image tool, or compare every palette in the theme library.