Cardboard for shadcn/ui

Cardboard is a shadcn/ui theme built around a muted teal primary color (#9db8ab) with muted orange accents (#b8ab9d). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted teal primary (#9db8ab) on a neutral background (#030705).

Color palette

TokenLightDark
Background
#ffffffwhite
#030705black
Foreground
#030c08black
#ffffffwhite
Card
#fcfcfcsnow
#050b08black
Card foreground
#020805black
#ffffffwhite
Popover
#fcfcfcsnow
#050b08black
Popover foreground
#020805black
#ffffffwhite
Primary
#9db8abdarkgray
#9db8abdarkgray
Primary foreground
#0f1512black
#0f1512black
Secondary
#ab9db8darkgray
#ab9db8darkgray
Secondary foreground
#120f15black
#120f15black
Muted
#f2eff5whitesmoke
#0d0a10black
Muted foreground
#575658dimgray
#a8a7a9darkgray
Accent
#b8ab9ddarkgray
#b8ab9ddarkgray
Accent foreground
#15120fblack
#15120fblack
Destructive
#b00e03firebrick
#fc3022orangered
Destructive foreground
#ffe8e6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9db8abdarkgray
#9db8abdarkgray

Contrast

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

Light mode
Text on background19.81:1AAA
Text on card19.76:1AAA
Primary button8.72:1AAA
Secondary button7.48:1AAA
Muted text6.42:1AA
Accent8.30:1AAA
Destructive6.17:1AA
Dark mode
Text on background20.24:1AAA
Text on card19.88:1AAA
Primary button8.72:1AAA
Secondary button7.48:1AAA
Muted text8.22:1AAA
Accent8.30:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.143 0.021 164.826);
  --muted: oklch(0.957 0.009 308.359);
  --muted-foreground: oklch(0.454 0.003 308.387);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.125 0.018 165.304);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.125 0.018 165.304);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.759 0.035 163.869);
  --primary-foreground: oklch(0.187 0.011 163.575);
  --secondary: oklch(0.718 0.041 307.824);
  --secondary-foreground: oklch(0.175 0.012 307.67);
  --accent: oklch(0.748 0.025 67.439);
  --accent-foreground: oklch(0.184 0.007 67.341);
  --destructive: oklch(0.48 0.191 29.934);
  --destructive-foreground: oklch(0.948 0.025 22.531);
  --ring: oklch(0.759 0.035 163.869);
  --chart-1: oklch(0.759 0.035 163.869);
  --chart-2: oklch(0.718 0.041 307.824);
  --chart-3: oklch(0.748 0.025 67.439);
  --chart-4: oklch(0.744 0.037 307.907);
  --chart-5: oklch(0.763 0.041 163.63);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.012 165.251);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.15 0.014 307.441);
  --muted-foreground: oklch(0.731 0.003 308.42);
  --popover: oklch(0.139 0.014 165.201);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.014 165.201);
  --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.759 0.035 163.869);
  --primary-foreground: oklch(0.187 0.011 163.575);
  --secondary: oklch(0.718 0.041 307.824);
  --secondary-foreground: oklch(0.175 0.012 307.67);
  --accent: oklch(0.748 0.025 67.439);
  --accent-foreground: oklch(0.184 0.007 67.341);
  --destructive: oklch(0.64 0.237 29.508);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.759 0.035 163.869);
  --chart-1: oklch(0.759 0.035 163.869);
  --chart-2: oklch(0.718 0.041 307.824);
  --chart-3: oklch(0.748 0.025 67.439);
  --chart-4: oklch(0.744 0.037 307.907);
  --chart-5: oklch(0.763 0.041 163.63);
}