Corduroy for shadcn/ui

Corduroy is a shadcn/ui theme built around an orange primary color (#996a38) with yellow accents (#979938). The light mode uses a neutral background (#fcfaf8). Dark mode keeps the orange primary (#996a38) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#fcfaf8snow
#040301black
Foreground
#0e0802black
#fdfcfcsnow
Card
#faf7f5whitesmoke
#070503black
Card foreground
#090501black
#ffffffwhite
Popover
#faf7f5whitesmoke
#070503black
Popover foreground
#090501black
#ffffffwhite
Primary
#996a38sienna
#996a38sienna
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#993a38brown
#993a38brown
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f2e4e3mistyrose
#1c0d0dblack
Muted foreground
#5f5858dimgray
#a7a0a0darkgray
Accent
#979938olivedrab
#979938olivedrab
Accent foreground
#040401black
#040401black
Destructive
#d32903firebrick
#fb3509orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#996a38sienna
#996a38sienna

Contrast

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

Light mode
Text on background19.11:1AAA
Text on card19.09:1AAA
Primary button4.69:1AA
Secondary button6.97:1AA
Muted text5.59:1AA
Accent6.75:1AA
Destructive5.13:1AA
Dark mode
Text on background20.17:1AAA
Text on card20.32:1AAA
Primary button4.69:1AA
Secondary button6.97:1AA
Muted text7.34:1AAA
Accent6.75:1AA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.003 69.62);
  --foreground: oklch(0.139 0.022 79.127);
  --muted: oklch(0.929 0.016 18.625);
  --muted-foreground: oklch(0.468 0.009 18.674);
  --popover: oklch(0.979 0.005 69.604);
  --popover-foreground: oklch(0.121 0.019 80.544);
  --card: oklch(0.979 0.005 69.604);
  --card-foreground: oklch(0.121 0.019 80.544);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.563 0.089 66.084);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.48 0.128 24.115);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.661 0.118 110.144);
  --accent-foreground: oklch(0.102 0.012 108.952);
  --destructive: oklch(0.561 0.208 32.49);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.563 0.089 66.084);
  --chart-1: oklch(0.563 0.089 66.084);
  --chart-2: oklch(0.48 0.128 24.115);
  --chart-3: oklch(0.661 0.118 110.144);
  --chart-4: oklch(0.505 0.135 24.174);
  --chart-5: oklch(0.566 0.094 65.667);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.094 0.008 75.917);
  --foreground: oklch(0.993 0.001 69.643);
  --muted: oklch(0.181 0.025 20.861);
  --muted-foreground: oklch(0.711 0.008 18.544);
  --popover: oklch(0.119 0.01 75.917);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.119 0.01 75.917);
  --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.563 0.089 66.084);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.48 0.128 24.115);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.661 0.118 110.144);
  --accent-foreground: oklch(0.102 0.012 108.952);
  --destructive: oklch(0.641 0.236 32.543);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.563 0.089 66.084);
  --chart-1: oklch(0.563 0.089 66.084);
  --chart-2: oklch(0.48 0.128 24.115);
  --chart-3: oklch(0.661 0.118 110.144);
  --chart-4: oklch(0.505 0.135 24.174);
  --chart-5: oklch(0.566 0.094 65.667);
}