# Theming

The Graphite tokens behind every component, in light and dark.

## How it works

`plumbago.css` defines every token as a `--pb-*` variable and maps it to a Tailwind utility, so you write `bg-surface` or `text-ink-2` instead of raw values. Change a variable and every component follows.

```css
:root {
  --pb-accent: #3d5f9e;
}

:root[data-theme="dark"] {
  --pb-accent: #9ebef8;
}
```

Want a different accent, gray tone, corner softness or font? Try them on a real screen on the [Create page](https://plumbago.ochotzas.com/create.md) and copy one command.

## Color

Surfaces and text are graphite. Emphasis comes from **ink**, not color. Color appears only when it means something: accent for links and focus, the status colors for status, categories for labels people pick.

### Surfaces

`bg`

`surface`

`press`

`track`

`line`

### Ink

`ink`

`ink-2`

`ink-3`

`on-ink`

### Meaning

`accent`

`success`

`warning`

`danger`

### Categories

`cat-slate`

`cat-sage`

`cat-sand`

`cat-clay`

`cat-rose`

`cat-lilac`

## Type

Figtree by default, or your preset's font (and heading font), set big and tight for titles. Use at most three sizes on a screen.

`title1`Tonight’s menu

`title2`Starters

`headline`Burrata and charred peach

`body`Basil oil and toasted hazelnuts.

`footnote`Ready in 12 minutes

`caption`Updated 2 minutes ago

## Radius

Corners are continuous, like Apple's: the edge eases into the curve instead of meeting a circle at a kink. Where the browser supports `corner-shape`, every rounded rectangle is a squircle with its radius scaled by 1.82, so `rounded-lg` draws a 40px squircle that looks like a 22px Apple corner. Other browsers draw plain round corners at the listed radius. Circles and capsules (`rounded-full`) stay round. Inside an island, nest smaller radii: inner radius is the outer one minus the padding.

`rounded-sm · 8`

`rounded-md · 14`

`rounded-lg · 22`

`rounded-xl · 34`

`rounded-full · 999`

## Dark mode

The theme follows the system setting. To choose for the user, set `data-theme="light"` or `data-theme="dark"` on the `html` element. The `dark:` variant follows the same attribute.
