David Ewins

Colours

I built this to get from one brand colour to a theme I can ship. Pick a colour, or start from what you want the brand to say, and you get a full light and dark palette that passes contrast, with the code.

Harmony
Start from a meaning

Palette

Tap any colour to copy its hex.

What these colours mean

White

Primary, Secondary, Accent

Surveys in Europe and the United States link white with perfection, the good, honesty, cleanliness, the beginning, the new, neutrality and exactitude. In many Asian cultures it is also the colour of mourning. Source

What white means in branding

Light and dark

Every text and background pair, checked against WCAG 2 contrast. AA needs 4.5:1 and AAA needs 7:1 for normal size text.

Light

Order confirmed

Your table is booked for 8pm. We'll text you if anything changes.

View bookingShareNew

Questions? Contact us

  • Text on background

    17.04:1AApassAAApass
  • Muted text on background

    6.20:1AApassAAAfail
  • Text on surface

    18.10:1AApassAAApass
  • Muted text on surface

    6.58:1AApassAAAfail
  • Primary as text on background

    1.01:1AAfailAAAfail
  • Label on primary

    16.87:1AApassAAApass
  • Label on secondary

    8.14:1AApassAAApass
  • Label on accent

    8.10:1AApassAAApass

Dark

Order confirmed

Your table is booked for 8pm. We'll text you if anything changes.

View bookingShareNew

Questions? Contact us

  • Text on background

    17.12:1AApassAAApass
  • Muted text on background

    7.69:1AApassAAApass
  • Text on surface

    15.40:1AApassAAApass
  • Muted text on surface

    6.92:1AApassAAAfail
  • Primary as text on background

    12.53:1AApassAAApass
  • Label on primary

    12.26:1AApassAAApass
  • Label on secondary

    12.27:1AApassAAApass
  • Label on accent

    12.22:1AApassAAApass

Export

Plain custom properties. Use them as var(--primary).

theme.css
/* Light by default, dark when the system asks for it. */
:root {
  color-scheme: light;
  --background: #f8f8f8;
  --surface: #ffffff;
  --border: #dedede;
  --text: #161616;
  --muted: #5d5d5d;
  --primary: #f7f7f5;
  --on-primary: #161616;
  --secondary: #adaeaf;
  --on-secondary: #161616;
  --accent: #aeadaf;
  --on-accent: #161616;
  --brand-50: #f5f5f4;
  --brand-100: #e8e8e7;
  --brand-200: #d4d4d3;
  --brand-300: #bbbbb9;
  --brand-400: #a1a1a0;
  --brand-500: #898987;
  --brand-600: #727270;
  --brand-700: #5b5b59;
  --brand-800: #454544;
  --brand-900: #30302f;
  --brand-950: #1f1f1e;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0f0f0f;
    --surface: #1b1b1a;
    --border: #2e2e2e;
    --text: #f2f2f2;
    --muted: #a4a4a4;
    --primary: #d1d1cf;
    --on-primary: #121211;
    --secondary: #d0d1d3;
    --on-secondary: #121211;
    --accent: #d2d0d2;
    --on-accent: #121211;
  }
}

The colours

How it works

The palette is worked out in OKLCH, a colour space where equal steps in lightness look like equal steps to the eye. Secondary and accent colours turn the hue and keep the lightness and chroma. Anything outside what a normal screen can show has its chroma lowered until it fits.

Contrast uses the WCAG 2 formula. The meanings come from colour surveys in Europe and the United States, so they won't hold everywhere: in China, red stands for happiness and good fortune, and in many Asian cultures white is the colour of mourning.

Swatch colours on this page are my own picks, not official brand values. Brands are named only where a source says they are known for the colour.

Sources

27 pages, all read when this was written.