# Colors

Eight tones × eleven shades, built in OKLCH for perceptual uniformity.

## How the system works

Colors are built from two independent axes: **tones** (hue + chroma) and **shades** (lightness). Theme switching inverts the shade scale automatically — no manual overrides needed.

OKLCH is the source of truth. Hex codes are provided for references.

## Main tones

- **base** 0.007 chroma · 36° hue Surface & text. The neutral backbone — backgrounds, borders, muted text.
- **tinted** 0.015 chroma · 36° hue Warm neutral. Base hue at higher chroma — a cream tint for marketing / docs surfaces, set as the surface tone.
- **primary** 0.13 chroma · 36° hue Brand accent. Interactive highlights, active states, focus rings.

## Semantic tones

- **danger** 0.07 chroma · 8° hue Destructive actions, errors, validation failures.
- **warning** 0.07 chroma · 76° hue Caution states, pending actions, degraded status.
- **success** 0.07 chroma · 144° hue Completed actions, healthy status, confirmations.
- **info** 0.07 chroma · 212° hue Informational messages, neutral highlights, tips.
- **help** 0.07 chroma · 280° hue Help text, documentation links, guidance.

## Shades

Eleven lightness steps from lightest surface to maximum contrast. In dark mode the scale inverts: 050 becomes the darkest, 950 the lightest.

- `--q-shade-050` Page background
- `--q-shade-100` Raised surface (panels, cards, nav)
- `--q-shade-200` Borders, dividers, hover backgrounds
- `--q-shade-300` Input backgrounds, subtle fills
- `--q-shade-400` Inactive icons, strong fills (text takes the text roles)
- `--q-shade-500` Midpoint — equal in both themes
- `--q-shade-600` Secondary text, subtle labels
- `--q-shade-700` Body text, active icons
- `--q-shade-800` Primary text, headings
- `--q-shade-900` High-contrast text, strong emphasis
- `--q-shade-950` Maximum contrast

## Full palette

Every tone × every shade, with hex and OKLCH for the active **dark** theme. Click any value to copy.

**base** 0.007 · 36°

- base-050 #252120  oklch(0.251 0.007 36)
- base-100 #2e2928  oklch(0.286 0.007 36)
- base-200 #403b3a  oklch(0.357 0.007 36)
- base-300 #534e4d  oklch(0.428 0.007 36)
- base-400 #676260  oklch(0.499 0.007 36)
- base-500 #7b7674  oklch(0.570 0.007 36)
- base-600 #918b89  oklch(0.641 0.007 36)
- base-700 #a6a19f  oklch(0.712 0.007 36)
- base-800 #bdb7b5  oklch(0.783 0.007 36)
- base-900 #d3cdcc  oklch(0.854 0.007 36)
- base-950 #dfd9d7  oklch(0.890 0.007 36)

**tinted** 0.015 · 36°

- tinted-050 #291f1d  oklch(0.251 0.015 36)
- tinted-100 #312825  oklch(0.286 0.015 36)
- tinted-200 #443a37  oklch(0.357 0.015 36)
- tinted-300 #574d4a  oklch(0.428 0.015 36)
- tinted-400 #6b605d  oklch(0.499 0.015 36)
- tinted-500 #807471  oklch(0.570 0.015 36)
- tinted-600 #958986  oklch(0.641 0.015 36)
- tinted-700 #ab9f9c  oklch(0.712 0.015 36)
- tinted-800 #c2b5b2  oklch(0.783 0.015 36)
- tinted-900 #d9ccc8  oklch(0.854 0.015 36)
- tinted-950 #e4d8d4  oklch(0.890 0.015 36)

**primary** 0.13 · 36°

- primary-050 #4c0000  oklch(0.251 0.13 36)
- primary-100 #5a0000  oklch(0.286 0.13 36)
- primary-200 #711500  oklch(0.357 0.13 36)
- primary-300 #882c12  oklch(0.428 0.13 36)
- primary-400 #9f4229  oklch(0.499 0.13 36)
- primary-500 #b7573e  oklch(0.570 0.13 36)
- primary-600 #cf6d52  oklch(0.641 0.13 36)
- primary-700 #e78367  oklch(0.712 0.13 36)
- primary-800 #ff997d  oklch(0.783 0.13 36)
- primary-900 #ffb79f  oklch(0.854 0.13 36)
- primary-950 #ffc8b5  oklch(0.890 0.13 36)

**danger** 0.07 · 8°

- danger-050 #3c101b  oklch(0.251 0.07 8)
- danger-100 #461924  oklch(0.286 0.07 8)
- danger-200 #5b2b35  oklch(0.357 0.07 8)
- danger-300 #703e48  oklch(0.428 0.07 8)
- danger-400 #85525b  oklch(0.499 0.07 8)
- danger-500 #9b666f  oklch(0.570 0.07 8)
- danger-600 #b27b84  oklch(0.641 0.07 8)
- danger-700 #c9909a  oklch(0.712 0.07 8)
- danger-800 #e1a6b0  oklch(0.783 0.07 8)
- danger-900 #f9bdc6  oklch(0.854 0.07 8)
- danger-950 #ffc8d2  oklch(0.890 0.07 8)

**warning** 0.07 · 76°

- warning-050 #341b00  oklch(0.251 0.07 76)
- warning-100 #3e2400  oklch(0.286 0.07 76)
- warning-200 #513607  oklch(0.357 0.07 76)
- warning-300 #654a1e  oklch(0.428 0.07 76)
- warning-400 #7a5d33  oklch(0.499 0.07 76)
- warning-500 #8f7247  oklch(0.570 0.07 76)
- warning-600 #a5875b  oklch(0.641 0.07 76)
- warning-700 #bc9d70  oklch(0.712 0.07 76)
- warning-800 #d2b386  oklch(0.783 0.07 76)
- warning-900 #eac99c  oklch(0.854 0.07 76)
- warning-950 #f6d5a7  oklch(0.890 0.07 76)

**success** 0.07 · 144°

- success-050 #072a09  oklch(0.251 0.07 144)
- success-100 #113312  oklch(0.286 0.07 144)
- success-200 #234624  oklch(0.357 0.07 144)
- success-300 #365936  oklch(0.428 0.07 144)
- success-400 #4a6e49  oklch(0.499 0.07 144)
- success-500 #5e825d  oklch(0.570 0.07 144)
- success-600 #739872  oklch(0.641 0.07 144)
- success-700 #88ae87  oklch(0.712 0.07 144)
- success-800 #9ec59c  oklch(0.783 0.07 144)
- success-900 #b4dcb3  oklch(0.854 0.07 144)
- success-950 #c0e7be  oklch(0.890 0.07 144)

**info** 0.07 · 212°

- info-050 #002933  oklch(0.251 0.07 212)
- info-100 #00333e  oklch(0.286 0.07 212)
- info-200 #004552  oklch(0.357 0.07 212)
- info-300 #0e5965  oklch(0.428 0.07 212)
- info-400 #296d7a  oklch(0.499 0.07 212)
- info-500 #40828f  oklch(0.570 0.07 212)
- info-600 #5698a5  oklch(0.641 0.07 212)
- info-700 #6caebc  oklch(0.712 0.07 212)
- info-800 #82c5d2  oklch(0.783 0.07 212)
- info-900 #99dcea  oklch(0.854 0.07 212)
- info-950 #a4e8f6  oklch(0.890 0.07 212)

**help** 0.07 · 280°

- help-050 #1c1c42  oklch(0.251 0.07 280)
- help-100 #24254c  oklch(0.286 0.07 280)
- help-200 #353760  oklch(0.357 0.07 280)
- help-300 #484b75  oklch(0.428 0.07 280)
- help-400 #5b5e8a  oklch(0.499 0.07 280)
- help-500 #6f73a0  oklch(0.570 0.07 280)
- help-600 #8488b7  oklch(0.641 0.07 280)
- help-700 #999ece  oklch(0.712 0.07 280)
- help-800 #afb4e5  oklch(0.783 0.07 280)
- help-900 #c5cbfd  oklch(0.854 0.07 280)
- help-950 #d1d6ff  oklch(0.890 0.07 280)

## Common pairings

- `--q-surface-base` Page background
- `--q-surface-panel` Card / panel
- `--q-border-strong` Border
- `--q-text` Body text
- Active accent
- Error text

## Examples

```svelte
<script lang="ts">
  import Button from '@qualia-studios/design-ui/components/Button.svelte';
  import Message from '@qualia-studios/design-ui/components/Message.svelte';
</script>
```

### Example 1: The accent on actions

The primary tone fills the one action that matters; the rest step down to an outline or text.

```svelte
<Button tone="primary">Save</Button>
<Button tone="primary" variant="outlined">Preview</Button>
<Button tone="primary" variant="text">Cancel</Button>
```

### Example 2: Status in its tone

Each semantic tone pairs a soft fill with its own ink.

```svelte
<div class="stack">
  <Message severity="success">Operation completed.</Message>
  <Message severity="warning">Heads up — review before continuing.</Message>
  <Message severity="danger">Something went wrong.</Message>
</div>
```

### Example 3: Surfaces a rung apart

Base, panel and inset separate on tone alone, with no border.

```svelte
<div class="rungs">
  <div class="rung base">base</div>
  <div class="rung panel">panel</div>
  <div class="rung inset">inset</div>
</div>
```

---

From the Qualia design guide: https://q-core-3b2732.gitlab.io/tokens/colors. Every page as markdown: https://q-core-3b2732.gitlab.io/llms.txt
