Charter for shadcn/ui

Charter is a shadcn/ui theme built around a muted light orange primary color (#dcd0cb) with muted light cyan accents (#cbd7dc). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light orange primary (#dcd0cb) on a neutral background (#080402).

Color palette

TokenLightDark
Background
#ffffffwhite
#080402black
Foreground
#040201black
#fbf9f9snow
Card
#fcfcfcsnow
#0c0603black
Card foreground
#000000black
#fdfcfcsnow
Popover
#ffffffwhite
#080402black
Popover foreground
#040201black
#fbf9f9snow
Primary
#dcd0cblightgrey
#dcd0cblightgrey
Primary foreground
#463630darkslategray
#463630darkslategray
Secondary
#cbd7dclightgrey
#cbd7dclightgrey
Secondary foreground
#303f46darkslategray
#303f46darkslategray
Muted
#e8ecedlavender
#121617black
Muted foreground
#3f4f55darkslategray
#aabac0silver
Accent
#cbd7dclightgrey
#cbd7dclightgrey
Accent foreground
#303f46darkslategray
#303f46darkslategray
Destructive
#7a210bmaroon
#ec4b22orangered
Destructive foreground
#f9c9bdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dcd0cblightgrey
#dcd0cblightgrey

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.70:1AAA
Text on card20.54:1AAA
Primary button7.61:1AAA
Secondary button7.44:1AAA
Muted text7.16:1AAA
Accent7.44:1AAA
Destructive6.89:1AA
Dark mode
Text on background19.47:1AAA
Text on card19.67:1AAA
Primary button7.61:1AAA
Secondary button7.44:1AAA
Muted text9.12:1AAA
Accent7.44:1AAA
Destructive3.76:1AA Large

CSS variables

Paste this into your globals.css to use Charter in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.09 0.01 50.589);
  --muted: oklch(0.94 0.005 223.183);
  --muted-foreground: oklch(0.415 0.023 223.859);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.09 0.01 50.589);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.866 0.015 42.983);
  --primary-foreground: oklch(0.348 0.025 42.64);
  --secondary: oklch(0.872 0.014 223.305);
  --secondary-foreground: oklch(0.358 0.023 224.067);
  --accent: oklch(0.872 0.014 223.305);
  --accent-foreground: oklch(0.358 0.023 224.067);
  --destructive: oklch(0.389 0.127 34.487);
  --destructive-foreground: oklch(0.876 0.057 34.379);
  --ring: oklch(0.866 0.015 42.983);
  --chart-1: oklch(0.866 0.015 42.983);
  --chart-2: oklch(0.872 0.014 223.305);
  --chart-3: oklch(0.872 0.014 223.305);
  --chart-4: oklch(0.895 0.012 223.267);
  --chart-5: oklch(0.866 0.017 42.962);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.113 0.013 50.761);
  --foreground: oklch(0.984 0.002 43.111);
  --muted: oklch(0.195 0.007 223.568);
  --muted-foreground: oklch(0.778 0.02 223.414);
  --popover: oklch(0.113 0.013 50.761);
  --popover-foreground: oklch(0.984 0.002 43.111);
  --card: oklch(0.129 0.015 50.422);
  --card-foreground: oklch(0.992 0.001 43.121);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.866 0.015 42.983);
  --primary-foreground: oklch(0.348 0.025 42.64);
  --secondary: oklch(0.872 0.014 223.305);
  --secondary-foreground: oklch(0.358 0.023 224.067);
  --accent: oklch(0.872 0.014 223.305);
  --accent-foreground: oklch(0.358 0.023 224.067);
  --destructive: oklch(0.635 0.204 34.613);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.866 0.015 42.983);
  --chart-1: oklch(0.866 0.015 42.983);
  --chart-2: oklch(0.872 0.014 223.305);
  --chart-3: oklch(0.872 0.014 223.305);
  --chart-4: oklch(0.895 0.012 223.267);
  --chart-5: oklch(0.866 0.017 42.962);
}