# Palettes

Five palettes share one set of colour roles, so every component works in all of them. Set one on the page, or on any element to theme just that part.

```html
<html data-palette="meadow">

<!-- or only a section -->
<section data-palette="lantern">…</section>
```

With no `data-palette`, the page uses Village, and switches to Lantern when the system is in dark mode (or `data-theme="dark"` is set).

## Village

Default. Terracotta tiles, warm lime-washed walls, rice gold and bamboo green.

## Meadow

Young rice and banana leaves after rain.

## Lotus

Lotus pond in early summer: petal pink, leaf green, warm cream.

## River

Morning river and sky: clear blues with sandy banks.

## Lantern · dark

Dark. An evening lit by an oil lamp: deep indigo, warm amber.

## Make your own

Add a block to `tokens.json` under `palettes` and run `pnpm tokens`, or write the variables by hand. Every role must be set; walls are the face colour about one step darker. `pnpm contrast` checks every text pair against WCAG AA (4.5:1).

my-palette.css:

```css
[data-palette="tea"] {
  color-scheme: light;
  --cz-page: #F3E7C9;
  --cz-page-sky: #BFE3EE;
  --cz-surface: #FBF4E2;
  --cz-surface-top: #FFFAF0;
  --cz-surface-bottom: #F5EAD0;
  --cz-surface-wall: #C9A979;
  --cz-surface-sunken: #E8D7AE;
  --cz-text: #3B2618;
  --cz-text-muted: #6B4E36;
  --cz-text-inverse: #FFF8E7;
  --cz-outline: #5A3A28;
  --cz-outline-soft: #8A5B3C;
  --cz-primary: #B04A2C;
  --cz-primary-wall: #8C3920;
  --cz-primary-text: #FFF8E7;
  --cz-secondary: #E9C77E;
  --cz-secondary-wall: #C9A35A;
  --cz-secondary-text: #3B2618;
  --cz-success: #4F7330;
  --cz-success-wall: #3A5622;
  --cz-success-text: #FFF8E7;
  --cz-success-bright: #8DB84A;
  --cz-reward: #E2A93A;
  --cz-reward-wall: #B9832A;
  --cz-reward-text: #3B2618;
  --cz-danger: #9E3A2C;
  --cz-danger-wall: #76281E;
  --cz-danger-text: #FFF8E7;
  --cz-info: #5D7486;
  --cz-info-text: #FFF8E7;
  --cz-accent: #BFE3EE;
  --cz-accent-text: #3B2618;
  --cz-tint-success: #EEF5DD;
  --cz-tint-info: #E3EBF0;
  --cz-tint-danger: #F7E1D8;
  --cz-ring: #B04A2C;
  --cz-overlay: rgb(59 38 24 / 0.55);
  --cz-contact: rgb(59 38 24 / 0.38);
  --cz-tooltip: #5A3A28;
  --cz-tooltip-text: #F3E7C9;
}
```

- ## Customize it for your brand Your colours, type, material and the components your product needs, tuned and contrast-checked.: [DM @_trou3 on X](https://x.com/_trou3)

## Colour roles

### Village (`village`, light)

Default. Terracotta tiles, warm lime-washed walls, rice gold and bamboo green.

- `--cz-page`: #F3E7C9
- `--cz-page-sky`: #BFE3EE
- `--cz-surface`: #FBF4E2
- `--cz-surface-top`: #FFFAF0
- `--cz-surface-bottom`: #F5EAD0
- `--cz-surface-wall`: #C9A979
- `--cz-surface-sunken`: #E8D7AE
- `--cz-text`: #3B2618
- `--cz-text-muted`: #6B4E36
- `--cz-text-inverse`: #FFF8E7
- `--cz-outline`: #5A3A28
- `--cz-outline-soft`: #8A5B3C
- `--cz-primary`: #B04A2C
- `--cz-primary-wall`: #8C3920
- `--cz-primary-text`: #FFF8E7
- `--cz-secondary`: #E9C77E
- `--cz-secondary-wall`: #C9A35A
- `--cz-secondary-text`: #3B2618
- `--cz-success`: #4F7330
- `--cz-success-wall`: #3A5622
- `--cz-success-text`: #FFF8E7
- `--cz-success-bright`: #8DB84A
- `--cz-reward`: #E2A93A
- `--cz-reward-wall`: #B9832A
- `--cz-reward-text`: #3B2618
- `--cz-danger`: #9E3A2C
- `--cz-danger-wall`: #76281E
- `--cz-danger-text`: #FFF8E7
- `--cz-info`: #5D7486
- `--cz-info-text`: #FFF8E7
- `--cz-accent`: #BFE3EE
- `--cz-accent-text`: #3B2618
- `--cz-tint-success`: #EEF5DD
- `--cz-tint-info`: #E3EBF0
- `--cz-tint-danger`: #F7E1D8
- `--cz-ring`: #B04A2C
- `--cz-overlay`: rgb(59 38 24 / 0.55)
- `--cz-contact`: rgb(59 38 24 / 0.38)
- `--cz-tooltip`: #5A3A28
- `--cz-tooltip-text`: #F3E7C9

### Meadow (`meadow`, light)

Young rice and banana leaves after rain.

- `--cz-page`: #E9F0D2
- `--cz-page-sky`: #CFE8D8
- `--cz-surface`: #F8FBEC
- `--cz-surface-top`: #FDFFF5
- `--cz-surface-bottom`: #EDF3D8
- `--cz-surface-wall`: #A9B97A
- `--cz-surface-sunken`: #D9E4B8
- `--cz-text`: #26301A
- `--cz-text-muted`: #4D5A36
- `--cz-text-inverse`: #FBFFF0
- `--cz-outline`: #3B4724
- `--cz-outline-soft`: #6B7A45
- `--cz-primary`: #3F6E2A
- `--cz-primary-wall`: #2D521D
- `--cz-primary-text`: #FBFFF0
- `--cz-secondary`: #D6E59A
- `--cz-secondary-wall`: #AFC26A
- `--cz-secondary-text`: #26301A
- `--cz-success`: #2F6B4F
- `--cz-success-wall`: #1F4D38
- `--cz-success-text`: #F2FFF7
- `--cz-success-bright`: #6FBF8E
- `--cz-reward`: #E8C547
- `--cz-reward-wall`: #BC9B2C
- `--cz-reward-text`: #26301A
- `--cz-danger`: #A0412E
- `--cz-danger-wall`: #782D20
- `--cz-danger-text`: #FFF6EE
- `--cz-info`: #4F6E7E
- `--cz-info-text`: #F4FBFF
- `--cz-accent`: #CFE8D8
- `--cz-accent-text`: #26301A
- `--cz-tint-success`: #E2F2E6
- `--cz-tint-info`: #E1EBEF
- `--cz-tint-danger`: #F6E1D9
- `--cz-ring`: #3F6E2A
- `--cz-overlay`: rgb(38 48 26 / 0.55)
- `--cz-contact`: rgb(38 48 26 / 0.36)
- `--cz-tooltip`: #3B4724
- `--cz-tooltip-text`: #E9F0D2

### Lotus (`lotus`, light)

Lotus pond in early summer: petal pink, leaf green, warm cream.

- `--cz-page`: #F8E4E4
- `--cz-page-sky`: #F3D3DA
- `--cz-surface`: #FFF6F3
- `--cz-surface-top`: #FFFBF9
- `--cz-surface-bottom`: #F9E8E3
- `--cz-surface-wall`: #D9A6A9
- `--cz-surface-sunken`: #F0D2CF
- `--cz-text`: #3D1F28
- `--cz-text-muted`: #6E4352
- `--cz-text-inverse`: #FFF5F7
- `--cz-outline`: #5B2E3C
- `--cz-outline-soft`: #8E5A68
- `--cz-primary`: #B2456A
- `--cz-primary-wall`: #8A3150
- `--cz-primary-text`: #FFF5F7
- `--cz-secondary`: #F4C3CF
- `--cz-secondary-wall`: #D69AAA
- `--cz-secondary-text`: #3D1F28
- `--cz-success`: #4E7A43
- `--cz-success-wall`: #385A30
- `--cz-success-text`: #F7FFF2
- `--cz-success-bright`: #8CC27A
- `--cz-reward`: #EFB94B
- `--cz-reward-wall`: #C28E2E
- `--cz-reward-text`: #3D1F28
- `--cz-danger`: #9A2F2F
- `--cz-danger-wall`: #722020
- `--cz-danger-text`: #FFF5F2
- `--cz-info`: #5E6C8A
- `--cz-info-text`: #F6F8FF
- `--cz-accent`: #CFE6D2
- `--cz-accent-text`: #3D1F28
- `--cz-tint-success`: #EAF4E4
- `--cz-tint-info`: #E7EAF3
- `--cz-tint-danger`: #F8DEDB
- `--cz-ring`: #B2456A
- `--cz-overlay`: rgb(61 31 40 / 0.55)
- `--cz-contact`: rgb(61 31 40 / 0.36)
- `--cz-tooltip`: #5B2E3C
- `--cz-tooltip-text`: #F8E4E4

### River (`river`, light)

Morning river and sky: clear blues with sandy banks.

- `--cz-page`: #E2EEF2
- `--cz-page-sky`: #BFE0EE
- `--cz-surface`: #F7FBFC
- `--cz-surface-top`: #FFFFFF
- `--cz-surface-bottom`: #E9F2F5
- `--cz-surface-wall`: #9CB8C4
- `--cz-surface-sunken`: #D3E3EA
- `--cz-text`: #1C2C36
- `--cz-text-muted`: #435866
- `--cz-text-inverse`: #F5FBFF
- `--cz-outline`: #2B4150
- `--cz-outline-soft`: #5A7586
- `--cz-primary`: #2D6A92
- `--cz-primary-wall`: #1F4E6D
- `--cz-primary-text`: #F5FBFF
- `--cz-secondary`: #EAD9AE
- `--cz-secondary-wall`: #C6B07C
- `--cz-secondary-text`: #1C2C36
- `--cz-success`: #2F6B55
- `--cz-success-wall`: #204D3D
- `--cz-success-text`: #F2FFFA
- `--cz-success-bright`: #6CC2A0
- `--cz-reward`: #E9B54A
- `--cz-reward-wall`: #BD8B2E
- `--cz-reward-text`: #1C2C36
- `--cz-danger`: #A33D33
- `--cz-danger-wall`: #7A2A23
- `--cz-danger-text`: #FFF6F4
- `--cz-info`: #5A6F86
- `--cz-info-text`: #F5F9FF
- `--cz-accent`: #C6E6D9
- `--cz-accent-text`: #1C2C36
- `--cz-tint-success`: #E1F2EA
- `--cz-tint-info`: #E2EAF2
- `--cz-tint-danger`: #F6E0DC
- `--cz-ring`: #2D6A92
- `--cz-overlay`: rgb(28 44 54 / 0.55)
- `--cz-contact`: rgb(28 44 54 / 0.34)
- `--cz-tooltip`: #2B4150
- `--cz-tooltip-text`: #E2EEF2

### Lantern (`lantern`, dark)

Dark. An evening lit by an oil lamp: deep indigo, warm amber.

- `--cz-page`: #1B1828
- `--cz-page-sky`: #272247
- `--cz-surface`: #2C2740
- `--cz-surface-top`: #363050
- `--cz-surface-bottom`: #262236
- `--cz-surface-wall`: #151222
- `--cz-surface-sunken`: #1F1B2E
- `--cz-text`: #F3E7C9
- `--cz-text-muted`: #C5B79A
- `--cz-text-inverse`: #1B1828
- `--cz-outline`: #0C0A14
- `--cz-outline-soft`: #4A4266
- `--cz-primary`: #E9A23B
- `--cz-primary-wall`: #A86C1E
- `--cz-primary-text`: #24160A
- `--cz-secondary`: #4A4266
- `--cz-secondary-wall`: #2F2946
- `--cz-secondary-text`: #F3E7C9
- `--cz-success`: #79B85A
- `--cz-success-wall`: #4D7E36
- `--cz-success-text`: #14200C
- `--cz-success-bright`: #9BD27A
- `--cz-reward`: #F2C25A
- `--cz-reward-wall`: #B48A2E
- `--cz-reward-text`: #24160A
- `--cz-danger`: #E07A62
- `--cz-danger-wall`: #A14A36
- `--cz-danger-text`: #24100A
- `--cz-info`: #8FA6C9
- `--cz-info-text`: #141A26
- `--cz-accent`: #3D5470
- `--cz-accent-text`: #F3E7C9
- `--cz-tint-success`: #2F3B2E
- `--cz-tint-info`: #2B3142
- `--cz-tint-danger`: #3E2A2E
- `--cz-ring`: #F2C25A
- `--cz-overlay`: rgb(8 6 14 / 0.7)
- `--cz-contact`: rgb(0 0 0 / 0.5)
- `--cz-tooltip`: #F3E7C9
- `--cz-tooltip-text`: #1B1828

Docs: https://cozy-ui.solo.engineer/docs/palettes/
