Palette Library

Heartbeat

A bold palette for health with a red primary and a pink accent. Text reaches 13.41:1 in light mode and 15.95:1 in dark mode.

How to use it

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

  • Light mode: page #fffefd, cards #f4f1ef, and text #352d25 at 13.41:1; buttons #be123c with #fffefd labels at 6.23:1; highlights #fda4af with #352d25 text at 7.14:1.
  • Dark mode: page #1a1715, cards #2d251d, and text #fdf0e6 at 15.95:1; buttons #ff6b79 with #1a1715 labels at 6.48:1; highlights #fda4af with #1a1715 text at 9.43:1.
  • Links: #be123c reaches 6.23:1 on the light page, and #ff6b79 reaches 6.48:1 on the dark page.
  • The accent as text: In light mode, keep #fda4af for fills and badges, not text: it reaches only 1.87: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
#fffefd
#1a1715
Surface
#f4f1ef
#2d251d
Text
#352d25
#fdf0e6
Primary
#be123c
#ff6b79
Primary Foreground
#fffefd
#1a1715
Accent
#fda4af
#fda4af
Accent Foreground
#352d25
#1a1715

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.41:1AAArequired12.02:1AAArequired2.15:1Fail7.14:1AAA
Primary6.23:1AArequired5.58:1AA1.00:1Fail3.32:1AA large
Accent1.87:1Fail1.68:1Fail3.32:1AA large1.00:1Fail
Primary Foreground1.00:1Fail1.11:1Fail6.23:1AArequired1.87:1Fail
Accent Foreground13.41:1AAA12.02:1AAA2.15:1Fail7.14:1AAArequired

Dark mode

Scroll the table sideways on a small screen.

dark mode: foreground rows on background columns
Foreground / BackgroundBackgroundSurfacePrimaryAccent
Text15.95:1AAArequired13.47:1AAArequired2.46:1Fail1.69:1Fail
Primary6.48:1AArequired5.47:1AA1.00:1Fail1.45:1Fail
Accent9.43:1AAA7.96:1AAA1.45:1Fail1.00:1Fail
Primary Foreground1.00:1Fail1.18:1Fail6.48:1AArequired9.43:1AAA
Accent Foreground1.00:1Fail1.18:1Fail6.48:1AA9.43: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: #fffefd;
  --surface: #f4f1ef;
  --text: #352d25;
  --primary: #be123c;
  --primary-foreground: #fffefd;
  --accent: #fda4af;
  --accent-foreground: #352d25;
}

.dark {
  --background: #1a1715;
  --surface: #2d251d;
  --text: #fdf0e6;
  --primary: #ff6b79;
  --primary-foreground: #1a1715;
  --accent: #fda4af;
  --accent-foreground: #1a1715;
}

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: #fffefd;
  --surface: #f4f1ef;
  --text: #352d25;
  --primary: #be123c;
  --primary-foreground: #fffefd;
  --accent: #fda4af;
  --accent-foreground: #352d25;
}

.dark {
  color-scheme: dark;
  --background: #1a1715;
  --surface: #2d251d;
  --text: #fdf0e6;
  --primary: #ff6b79;
  --primary-foreground: #1a1715;
  --accent: #fda4af;
  --accent-foreground: #1a1715;
}

@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 First Aid, which shares the bold style: text reaches 13.41:1 in light mode against 18.58:1, both use a red primary, and the accent is pink where First Aid's is blue.
  • Compared with Market Stall, which shares the bold style: text reaches 13.41:1 in light mode against 13.29:1, both use a red primary, and the accent is pink where Market Stall's is green.