Palette Library

Trailhead

An earthy palette for nature with a green primary and a red accent. Text reaches 13.02:1 in light mode and 14.30:1 in dark mode.

How to use it

Trailhead's roles on a real interface, with the ratios stored for this palette.

  • Light mode: page #fafcff, cards #ebf0f6, and text #25303d at 13.02:1; buttons #386641 with #fafcff labels at 6.49:1; highlights #bc4749 with #fafcff text at 4.94:1.
  • Dark mode: page #15191e, cards #23282f, and text #e1e8f1 at 14.30:1; buttons #86b78e with #15191e labels at 7.71:1; highlights #ed7371 with #15191e text at 6.12:1.
  • Links: #386641 reaches 6.49:1 on the light page, and #86b78e reaches 7.71:1 on the dark page.
  • The accent as text: #bc4749 also works as text: 4.94:1 on the light page and 6.12:1 on the dark page.

Preview

The same palette on a small interface in light and dark.

Light mode

A place for your ideas

Start with colors that work together.

Your next project

A surface for the details that matter.

Get startedNew

Explore your palette →

Dark mode

A place for your ideas

Start with colors that work together.

Your next project

A surface for the details that matter.

Get startedNew

Explore your palette →

Roles

Five roles and their two foregrounds. Copy the exact HEX values.

RoleLightDark
Background
#fafcff
#15191e
Surface
#ebf0f6
#23282f
Text
#25303d
#e1e8f1
Primary
#386641
#86b78e
Primary Foreground
#fafcff
#15191e
Accent
#bc4749
#ed7371
Accent Foreground
#fafcff
#15191e

Contrast matrix

Five required pairs per mode, judged on the final 8-bit colors.

Light mode

Scroll the table sideways on a small screen.

light mode: foreground rows on background columns
Foreground / BackgroundBackgroundSurfacePrimaryAccent
Text13.02:1AAArequired11.68:1AAArequired2.00:1Fail2.63:1Fail
Primary6.49:1AArequired5.82:1AA1.00:1Fail1.31:1Fail
Accent4.94:1AA4.43:1AA large1.31:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.11:1Fail6.49:1AArequired4.94:1AA
Accent Foreground1.00:1Fail1.11:1Fail6.49:1AA4.94:1AArequired

Dark mode

Scroll the table sideways on a small screen.

dark mode: foreground rows on background columns
Foreground / BackgroundBackgroundSurfacePrimaryAccent
Text14.30:1AAArequired12.01:1AAArequired1.85:1Fail2.33:1Fail
Primary7.71:1AAArequired6.48:1AA1.00:1Fail1.25:1Fail
Accent6.12:1AA5.14:1AA1.25:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.19:1Fail7.71:1AAArequired6.12:1AA
Accent Foreground1.00:1Fail1.19:1Fail7.71:1AAA6.12:1AArequired

AAA: normal text ≥ 7:1. AA: normal text ≥ 4.5:1. AA large: large text ≥ 3:1 (24 px, or 18.66 px bold). UI: required component contrast ≥ 3:1. Fail: below 3:1. Required marks the five pairs ColorLint checks in each mode. Other pairs are informational.

ColorLint checks color contrast only. Passing pairs do not mean a page is accessible.

Exports

Both modes, with the exact values the Palette Generator exports.

CSS variables

/* ColorLint palette (v1). Light values in :root; dark values in .dark. */

:root {
  --background: #fafcff;
  --surface: #ebf0f6;
  --text: #25303d;
  --primary: #386641;
  --primary-foreground: #fafcff;
  --accent: #bc4749;
  --accent-foreground: #fafcff;
}

.dark {
  --background: #15191e;
  --surface: #23282f;
  --text: #e1e8f1;
  --primary: #86b78e;
  --primary-foreground: #15191e;
  --accent: #ed7371;
  --accent-foreground: #15191e;
}

Tailwind v4

/* ColorLint palette for Tailwind CSS v4 (palette v1). */
/* Paste after @import "tailwindcss". Add the "dark" class to <html> for dark mode. */

@custom-variant dark (&:where(.dark, .dark *));

:root {
  color-scheme: light;
  --background: #fafcff;
  --surface: #ebf0f6;
  --text: #25303d;
  --primary: #386641;
  --primary-foreground: #fafcff;
  --accent: #bc4749;
  --accent-foreground: #fafcff;
}

.dark {
  color-scheme: dark;
  --background: #15191e;
  --surface: #23282f;
  --text: #e1e8f1;
  --primary: #86b78e;
  --primary-foreground: #15191e;
  --accent: #ed7371;
  --accent-foreground: #15191e;
}

@theme inline {
  --color-background: var(--background);
  --color-surface: var(--surface);
  --color-text: var(--text);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
}

Compared with similar palettes

  • Compared with Forest Trail, which shares the earthy style: text reaches 13.02:1 in light mode against 12.35:1, both use a green primary, and the accent is red where Forest Trail's is orange.
  • Compared with Greenhouse, which shares the Nature topic: text reaches 13.02:1 in light mode against 16.19:1, both use a green primary, and both use a red accent.