Carter for shadcn/ui

Carter is a shadcn/ui theme built around a muted green primary color (#647e4e) with muted light green accents (#c1c7bc). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#647e4e) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#ffffffwhite
#020401black
Foreground
#0a1004black
#fcfdfcwhite
Card
#fcfcfcsnow
#050802black
Card foreground
#070c03black
#ffffffwhite
Popover
#ffffffwhite
#020401black
Popover foreground
#0a1004black
#fcfdfcwhite
Primary
#647e4edimgray
#647e4edimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d6d7d5lightgrey
#323c2adarkslategray
Secondary foreground
#3d3f3bdarkslategray
#cbd5c3lightgrey
Muted
#f0f1efwhitesmoke
#0f100eblack
Muted foreground
#63695ddimgray
#9ba296darkgray
Accent
#c1c7bcsilver
#465a35darkolivegreen
Accent foreground
#282c25darkslategray
#ffffffwhite
Destructive
#9f410fsaddlebrown
#ec7332tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#647e4edimgray
#647e4edimgray

Contrast

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

Light mode
Text on background19.28:1AAA
Text on card19.33:1AAA
Primary button4.51:1AA
Secondary button7.39:1AAA
Muted text4.98:1AA
Accent8.25:1AAA
Destructive6.49:1AA
Dark mode
Text on background20.17:1AAA
Text on card20.16:1AAA
Primary button4.51:1AA
Secondary button7.65:1AAA
Muted text7.25:1AAA
Accent7.58:1AAA
Destructive7.05:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.162 0.027 130.422);
  --muted: oklch(0.956 0.003 130.464);
  --muted-foreground: oklch(0.513 0.02 130.812);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.162 0.027 130.422);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.145 0.023 129.314);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.561 0.078 131.924);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.879 0.004 130.476);
  --secondary-foreground: oklch(0.365 0.007 130.613);
  --accent: oklch(0.823 0.017 130.628);
  --accent-foreground: oklch(0.288 0.014 130.913);
  --destructive: oklch(0.495 0.137 43.604);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.561 0.078 131.924);
  --chart-1: oklch(0.561 0.078 131.924);
  --chart-2: oklch(0.879 0.004 130.476);
  --chart-3: oklch(0.823 0.017 130.628);
  --chart-4: oklch(0.902 0.003 130.468);
  --chart-5: oklch(0.568 0.087 132.113);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.015 129.176);
  --foreground: oklch(0.993 0.001 130.446);
  --muted: oklch(0.172 0.004 130.662);
  --muted-foreground: oklch(0.702 0.019 130.689);
  --popover: oklch(0.1 0.015 129.176);
  --popover-foreground: oklch(0.993 0.001 130.446);
  --card: oklch(0.126 0.019 129.176);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.561 0.078 131.924);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.341 0.032 131.377);
  --secondary-foreground: oklch(0.86 0.026 130.722);
  --accent: oklch(0.44 0.063 131.97);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.688 0.168 45.742);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.561 0.078 131.924);
  --chart-1: oklch(0.561 0.078 131.924);
  --chart-2: oklch(0.341 0.032 131.377);
  --chart-3: oklch(0.44 0.063 131.97);
  --chart-4: oklch(0.373 0.036 131.404);
  --chart-5: oklch(0.568 0.087 132.113);
}