# eSaintLucia colours

Generated by `Source/scripts/build_kit.py` from `Source/palette.json`. Do not hand-edit; change the palette and rebuild.

## Brand

| Token | Hex | Use |
|-------|-----|-----|
| Seal cerulean (light) | `#1090C6` | The seal. The site's own --brand (hsl 198 85% 42%) and --brand-dark (hsl 198 85% 48%). Marks always use #1090C6, which is at least 3:1 on both #FFFFFF and #0B0F17; #12A4E2 is the dark-theme UI value for small text, links and buttons. |
| Seal cerulean (dark theme) | `#12A4E2` | Dark-theme UI value for small text, links and buttons. The seal itself stays `#1090C6`. |
| Flag gold | `#FCD116` | Flag gold. Only ever inside the seal (the gold triangle). Never against the page, never as text or a line. |
| Ink | `#0A1633` | The locked wordmark navy on light backgrounds, and body text on light. |
| White | `#FFFFFF` | Seal ring and Piton, wordmark on dark. |

**One seal for both backgrounds.** `#1090C6` is 3.60:1 on `#FFFFFF` and 5.32:1 on `#0B0F17`, so the colour seal is the same file on light and dark and no tile swap is needed. Only the wordmark changes: ink (`#0A1633`) on light, white on dark. `#12A4E2` would be 2.82:1 on white, below 3:1, so it is not used for any mark.

**Gold never touches the page.** The gold triangle sits inside the seal, against the white Piton and the cerulean disc. It is never an outer edge, a standalone shape, a line or text. On a UI surface it is allowed only as a chip that carries ink text.

**Mono grey** `#71717A` exists only for the single-colour `grey` files in `Monochrome/` and the lockup folders. It is not a brand colour. `black` is `#000000`.

## Flag source

The Piton device and the gold come from the Saint Lucia national flag as published on Wikimedia Commons, `File:Flag_of_Saint_Lucia.svg`: blue `#66CCFF`, gold `#FCD116`, black `#000000`, white `#FFFFFF`. The geometry in `Source/masters/seal.json` (white arrowhead over a gold triangle on a shared base) is that file's. The Government of Saint Lucia describes the flag in words (cerulean blue field, black and white triangle, gold triangle at the base) but publishes no hex values, and web sources disagree on the blue, so this kit does not claim an official blue. The seal uses the site's own cerulean instead; flag blue `#66CCFF` is 1.80:1 on white and stays a reference only.

**How cerulean differs from Xiomid cobalt `#2B55D4`.** Hue 198 degrees against about 225, and a lighter, greener sky blue against a deep royal blue.

## Theme tokens (light / dark)

The neutral rows (background, surface, border, text, muted) are an **interface theme** picked to sit with the seal. They are not brand colours. Success, warning and error are standard **functional** colours; one set is used in both modes because each is at least 3:1 on both `#FFFFFF` and `#0B0F17`.

| Token | Light | Dark | Role |
|-------|-------|------|------|
| Primary | `#1090C6` | `#12A4E2` | brand (fills, buttons, graphics) |
| Primary hover | `#0B76A8` | `#38B6EE` | brand (state) |
| Primary (text, links) | `#0B76A8` | `#12A4E2` | brand (small text and links, 4.5:1) |
| Accent | `#FCD116` | `#FCD116` | brand (flag gold, seal and chips only) |
| Background | `#FFFFFF` | `#0B0F17` | neutral theme |
| Surface | `#F4F8FC` | `#131A26` | neutral theme |
| Border | `#DCE6EF` | `#243044` | neutral theme |
| Text | `#0A1633` | `#F1F5F9` | neutral theme |
| Muted | `#4B5A70` | `#9AA8BC` | neutral theme |
| Success | `#15803D` | `#15803D` | functional |
| Warning | `#B45309` | `#B45309` | functional |
| Error | `#DC2626` | `#DC2626` | functional |
| Brand gradient | none | none | The seal is flat. No gradient. |

`primary` is for fills, buttons and graphics (3:1 or better). For small text and links on light, use `primary-text` (`#0B76A8`, 5.03:1); `primary` itself is only 3.60:1 on white. White text on a `#1090C6` button is 3.60:1, so use ink text on it, or white text on `primary-text`.

## CSS variables

`Web/colors.css` (same content):

```css
/* eSaintLucia colours. Generated by Source/scripts/build_kit.py from Source/palette.json. Do not hand-edit. */
/* Brand = cerulean (the seal), flag gold (inside the seal only), ink and white. Background, surface, border, text and muted
   are neutral theme tokens. Success, warning and error are functional colours. */
:root {
  --esl-cerulean: #1090C6;
  --esl-cerulean-dark: #12A4E2;
  --esl-gold: #FCD116;
  --esl-ink: #0A1633;
  --esl-white: #FFFFFF;
  --esl-mono-grey: #71717A;
  --esl-primary: #1090C6;
  --esl-primary-hover: #0B76A8;
  --esl-primary-text: #0B76A8;
  --esl-accent: #FCD116;
  --esl-background: #FFFFFF;
  --esl-surface: #F4F8FC;
  --esl-border: #DCE6EF;
  --esl-text: #0A1633;
  --esl-muted: #4B5A70;
  --esl-success: #15803D;
  --esl-warning: #B45309;
  --esl-error: #DC2626;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --esl-primary: #12A4E2;
    --esl-primary-hover: #38B6EE;
    --esl-primary-text: #12A4E2;
    --esl-accent: #FCD116;
    --esl-background: #0B0F17;
    --esl-surface: #131A26;
    --esl-border: #243044;
    --esl-text: #F1F5F9;
    --esl-muted: #9AA8BC;
    --esl-success: #15803D;
    --esl-warning: #B45309;
    --esl-error: #DC2626;
    color-scheme: dark;
  }
}

[data-theme="light"] {
  --esl-primary: #1090C6;
  --esl-primary-hover: #0B76A8;
  --esl-primary-text: #0B76A8;
  --esl-accent: #FCD116;
  --esl-background: #FFFFFF;
  --esl-surface: #F4F8FC;
  --esl-border: #DCE6EF;
  --esl-text: #0A1633;
  --esl-muted: #4B5A70;
  --esl-success: #15803D;
  --esl-warning: #B45309;
  --esl-error: #DC2626;
  color-scheme: light;
}

[data-theme="dark"] {
  --esl-primary: #12A4E2;
  --esl-primary-hover: #38B6EE;
  --esl-primary-text: #12A4E2;
  --esl-accent: #FCD116;
  --esl-background: #0B0F17;
  --esl-surface: #131A26;
  --esl-border: #243044;
  --esl-text: #F1F5F9;
  --esl-muted: #9AA8BC;
  --esl-success: #15803D;
  --esl-warning: #B45309;
  --esl-error: #DC2626;
  color-scheme: dark;
}
```

## Tailwind

`Web/tailwind.colors.js` exposes `esaintlucia.*` semantic keys that read the CSS variables (so they follow light/dark), plus raw hex in `tokens.light` / `tokens.dark`.

```js
const esl = require('./tailwind.colors.js');
module.exports = { theme: { extend: { colors: { esaintlucia: esl.esaintlucia } } } };
// bg-esaintlucia-surface, text-esaintlucia-primary-text, border-esaintlucia-border, bg-esaintlucia-error …
```

## Contrast

Fills against the two reference backgrounds (`#FFFFFF` and `#0B0F17`, marks need at least 3:1 on both):

| Colour | On `#FFFFFF` | On `#0B0F17` |
|--------|-----------|-----------|
| Seal cerulean `#1090C6` | 3.60:1 | 5.32:1 |
| Dark-theme cerulean `#12A4E2` | 2.82:1 | 6.79:1 |
| Flag gold `#FCD116` | 1.47:1 | 13.03:1 |
| Ink (wordmark on light) `#0A1633` | 17.87:1 | 1.07:1 |
| Mono grey `#71717A` | 4.83:1 | 3.97:1 |
| Flag blue (reference) `#66CCFF` | 1.80:1 | 10.64:1 |
| Success `#15803D` | 5.02:1 | 3.82:1 |
| Warning `#B45309` | 5.02:1 | 3.82:1 |
| Error `#DC2626` | 4.83:1 | 3.97:1 |

Only the seal cerulean `#1090C6` and the mono grey are mark colours that touch the page, and both pass. Flag gold fails on white (1.47:1) by itself, which is why it never touches the page. Ink and white are paired per background (ink wordmark on light, white on dark), so each is about 1:1 on the other background by design.

Inside the seal:

| Pair | Ratio |
|------|-------|
| White ring and Piton on seal cerulean | 3.60:1 |
| Gold triangle on seal cerulean | 2.45:1 |
| Gold triangle on the white Piton | 1.47:1 |
| Ink text on gold chip | 12.14:1 |
| Ink text on seal cerulean | 4.96:1 |
| White text on seal cerulean | 3.60:1 |
| White text on primary-text `#0B76A8` | 5.03:1 |

The gold triangle on the cerulean disc is 2.45:1. It is told apart by hue and by the white Piton above it, as on the flag, not by luminance.

Text and controls on their own theme background (WCAG 2.x):

| Mode | Token | On | Ratio | Needs |
|------|-------|----|-------|-------|
| Light | Primary `#1090C6` | `#FFFFFF` | 3.60:1 | 3 (fill) |
| Light | Primary hover `#0B76A8` | `#FFFFFF` | 5.03:1 | 3 (fill) |
| Light | Primary (text, links) `#0B76A8` | `#FFFFFF` | 5.03:1 | 4.5 (text) |
| Light | Text `#0A1633` | `#FFFFFF` | 17.87:1 | 4.5 (text) |
| Light | Muted `#4B5A70` | `#FFFFFF` | 7.01:1 | 4.5 (text) |
| Dark | Primary `#12A4E2` | `#0B0F17` | 6.79:1 | 3 (fill) |
| Dark | Primary hover `#38B6EE` | `#0B0F17` | 8.31:1 | 3 (fill) |
| Dark | Primary (text, links) `#12A4E2` | `#0B0F17` | 6.79:1 | 4.5 (text) |
| Dark | Text `#F1F5F9` | `#0B0F17` | 17.51:1 | 4.5 (text) |
| Dark | Muted `#9AA8BC` | `#0B0F17` | 7.95:1 | 4.5 (text) |
