Palette Library

Storybook

A playful palette for education with a blue primary and an orange accent. Text reaches 17.83:1 in light mode and 14.91:1 in dark mode.

How to use it

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

  • Light mode: page #feffff, cards #eaf0f7, and text #0f1823 at 17.83:1; buttons #2f6fb0 with #feffff labels at 5.21:1; highlights #fb923c with #0f1823 text at 7.89:1.
  • Dark mode: page #07090b, cards #111214, and text #dcdfe3 at 14.91:1; buttons #65a5ea with #07090b labels at 7.71:1; highlights #fb923c with #07090b text at 8.81:1.
  • Links: #2f6fb0 reaches 5.21:1 on the light page, and #65a5ea reaches 7.71:1 on the dark page.
  • The accent as text: In light mode, keep #fb923c for fills and badges, not text: it reaches only 2.25:1 on the 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
#feffff
#07090b
Surface
#eaf0f7
#111214
Text
#0f1823
#dcdfe3
Primary
#2f6fb0
#65a5ea
Primary Foreground
#feffff
#07090b
Accent
#fb923c
#fb923c
Accent Foreground
#0f1823
#07090b

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
Text17.83:1AAArequired15.57:1AAArequired3.42:1AA large7.89:1AAA
Primary5.21:1AArequired4.55:1AA1.00:1Fail2.30:1Fail
Accent2.25:1Fail1.97:1Fail2.30:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.14:1Fail5.21:1AArequired2.25:1Fail
Accent Foreground17.83:1AAA15.57:1AAA3.42:1AA large7.89:1AAArequired

Dark mode

Scroll the table sideways on a small screen.

dark mode: foreground rows on background columns
Foreground / BackgroundBackgroundSurfacePrimaryAccent
Text14.91:1AAArequired14.01:1AAArequired1.93:1Fail1.69:1Fail
Primary7.71:1AAArequired7.25:1AAA1.00:1Fail1.14:1Fail
Accent8.81:1AAA8.28:1AAA1.14:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.06:1Fail7.71:1AAArequired8.81:1AAA
Accent Foreground1.00:1Fail1.06:1Fail7.71:1AAA8.81:1AAArequired

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: #feffff;
  --surface: #eaf0f7;
  --text: #0f1823;
  --primary: #2f6fb0;
  --primary-foreground: #feffff;
  --accent: #fb923c;
  --accent-foreground: #0f1823;
}

.dark {
  --background: #07090b;
  --surface: #111214;
  --text: #dcdfe3;
  --primary: #65a5ea;
  --primary-foreground: #07090b;
  --accent: #fb923c;
  --accent-foreground: #07090b;
}

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: #feffff;
  --surface: #eaf0f7;
  --text: #0f1823;
  --primary: #2f6fb0;
  --primary-foreground: #feffff;
  --accent: #fb923c;
  --accent-foreground: #0f1823;
}

.dark {
  color-scheme: dark;
  --background: #07090b;
  --surface: #111214;
  --text: #dcdfe3;
  --primary: #65a5ea;
  --primary-foreground: #07090b;
  --accent: #fb923c;
  --accent-foreground: #07090b;
}

@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 Classroom Pop, which shares the playful style: text reaches 17.83:1 in light mode against 18.07:1, the primary is blue where Classroom Pop's is red, and the accent is orange where Classroom Pop's is blue.
  • Compared with Reef Explorer, which shares the playful style: text reaches 17.83:1 in light mode against 15.30:1, both use a blue primary, and both use a orange accent.