Palette Library

Bonsai

A muted palette for nature with a green primary and a green accent. Text reaches 15.75:1 in light mode and 15.23:1 in dark mode.

How to use it

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

  • Light mode: page #fbfdfb, cards #edf8ef, and text #1e221f at 15.75:1; buttons #3a5a40 with #fbfdfb labels at 7.56:1; highlights #a3b18a with #1e221f text at 7.06:1.
  • Dark mode: page #101410, cards #1f2420, and text #e7e9e7 at 15.23:1; buttons #94b79a with #101410 labels at 8.40:1; highlights #85926c with #101410 text at 5.59:1.
  • Links: #3a5a40 reaches 7.56:1 on the light page, and #94b79a reaches 8.40:1 on the dark page.
  • The accent as text: In light mode, keep #a3b18a for fills and badges, not text: it reaches only 2.22: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
#fbfdfb
#101410
Surface
#edf8ef
#1f2420
Text
#1e221f
#e7e9e7
Primary
#3a5a40
#94b79a
Primary Foreground
#fbfdfb
#101410
Accent
#a3b18a
#85926c
Accent Foreground
#1e221f
#101410

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
Text15.75:1AAArequired14.78:1AAArequired2.08:1Fail7.06:1AAA
Primary7.56:1AAArequired7.09:1AAA1.00:1Fail3.39:1AA large
Accent2.22:1Fail2.09:1Fail3.39:1AA large1.00:1Fail
Primary Foreground1.00:1Fail1.06:1Fail7.56:1AAArequired2.22:1Fail
Accent Foreground15.75:1AAA14.78:1AAA2.08:1Fail7.06:1AAArequired

Dark mode

Scroll the table sideways on a small screen.

dark mode: foreground rows on background columns
Foreground / BackgroundBackgroundSurfacePrimaryAccent
Text15.23:1AAArequired12.92:1AAArequired1.81:1Fail2.72:1Fail
Primary8.40:1AAArequired7.13:1AAA1.00:1Fail1.50:1Fail
Accent5.59:1AA4.75:1AA1.50:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.17:1Fail8.40:1AAArequired5.59:1AA
Accent Foreground1.00:1Fail1.17:1Fail8.40:1AAA5.59: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: #fbfdfb;
  --surface: #edf8ef;
  --text: #1e221f;
  --primary: #3a5a40;
  --primary-foreground: #fbfdfb;
  --accent: #a3b18a;
  --accent-foreground: #1e221f;
}

.dark {
  --background: #101410;
  --surface: #1f2420;
  --text: #e7e9e7;
  --primary: #94b79a;
  --primary-foreground: #101410;
  --accent: #85926c;
  --accent-foreground: #101410;
}

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: #fbfdfb;
  --surface: #edf8ef;
  --text: #1e221f;
  --primary: #3a5a40;
  --primary-foreground: #fbfdfb;
  --accent: #a3b18a;
  --accent-foreground: #1e221f;
}

.dark {
  color-scheme: dark;
  --background: #101410;
  --surface: #1f2420;
  --text: #e7e9e7;
  --primary: #94b79a;
  --primary-foreground: #101410;
  --accent: #85926c;
  --accent-foreground: #101410;
}

@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 Moss and Stone, which shares the muted style: text reaches 15.75:1 in light mode against 17.04:1, both use a green primary, and the accent is green where Moss and Stone's is gray.
  • Compared with Forest Trail, which shares the Nature topic: text reaches 15.75:1 in light mode against 12.35:1, both use a green primary, and the accent is green where Forest Trail's is orange.