Cream for shadcn/ui

Cream is a shadcn/ui theme built around a vivid green primary color (#03a506) with vivid teal accents (#03a557). The light mode uses a neutral background (#f6fdf6). Dark mode keeps the vivid green primary (#03a506) on a green-tinted background (#041005).

Color palette

TokenLightDark
Background
#f6fdf6mintcream
#041005black
Foreground
#021202black
#f5f9f5whitesmoke
Card
#f2fdf2honeydew
#061406black
Card foreground
#020e02black
#f9fbf9mintcream
Popover
#f6fdf6mintcream
#041005black
Popover foreground
#021202black
#f5f9f5whitesmoke
Primary
#03a506green
#03a506green
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#51a503olivedrab
#51a503olivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e5eeddbeige
#192211black
Muted foreground
#545851dimgray
#abaea7darkgray
Accent
#03a557seagreen
#03a557seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d9390dorangered
#f25226tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#03a506green
#03a506green

Contrast

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

Light mode
Text on background18.69:1AAA
Text on card18.81:1AAA
Primary button3.28:1AA Large
Secondary button3.11:1AA Large
Muted text6.08:1AA
Accent3.22:1AA Large
Destructive4.63:1AA
Dark mode
Text on background18.26:1AAA
Text on card18.20:1AAA
Primary button3.28:1AA Large
Secondary button3.11:1AA Large
Muted text7.31:1AAA
Accent3.22:1AA Large
Destructive3.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.012 145.957);
  --foreground: oklch(0.162 0.044 143.65);
  --muted: oklch(0.938 0.024 129.401);
  --muted-foreground: oklch(0.453 0.012 129.399);
  --popover: oklch(0.988 0.012 145.957);
  --popover-foreground: oklch(0.162 0.044 143.65);
  --card: oklch(0.982 0.018 145.907);
  --card-foreground: oklch(0.144 0.039 143.74);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.626 0.211 142.593);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.643 0.19 135.8);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.633 0.163 152.754);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.584 0.202 34.328);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.626 0.211 142.593);
  --chart-1: oklch(0.626 0.211 142.593);
  --chart-2: oklch(0.643 0.19 135.8);
  --chart-3: oklch(0.633 0.163 152.754);
  --chart-4: oklch(0.686 0.203 135.888);
  --chart-5: oklch(0.633 0.214 142.579);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.031 144.361);
  --foreground: oklch(0.979 0.007 145.996);
  --muted: oklch(0.238 0.033 130.779);
  --muted-foreground: oklch(0.747 0.01 129.272);
  --popover: oklch(0.156 0.031 144.361);
  --popover-foreground: oklch(0.979 0.007 145.996);
  --card: oklch(0.172 0.036 144.238);
  --card-foreground: oklch(0.986 0.005 146.016);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.626 0.211 142.593);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.643 0.19 135.8);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.633 0.163 152.754);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.654 0.204 35.575);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.626 0.211 142.593);
  --chart-1: oklch(0.626 0.211 142.593);
  --chart-2: oklch(0.643 0.19 135.8);
  --chart-3: oklch(0.633 0.163 152.754);
  --chart-4: oklch(0.686 0.203 135.888);
  --chart-5: oklch(0.633 0.214 142.579);
}