Cast for shadcn/ui

Cast is a shadcn/ui theme built around a deep green primary color (#343914) with neutral gray accents (#c8c0c0). The light mode uses a neutral background (#fdfefb). Dark mode keeps the deep green primary (#343914) on a green-tinted background (#0a0b05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0a0b05black
Foreground
#080901black
#ffffffwhite
Card
#fcfcf8snow
#0d0e06black
Card foreground
#040501black
#ffffffwhite
Popover
#fcfcf8snow
#0d0e06black
Popover foreground
#040501black
#ffffffwhite
Primary
#343914darkslategray
#343914darkslategray
Primary foreground
#b5c454darkkhaki
#b5c454darkkhaki
Secondary
#d6d6d6lightgrey
#181915black
Secondary foreground
#3d3d3ddarkslategray
#b4b5aadarkgray
Muted
#e7e4e4gainsboro
#1b1b18black
Muted foreground
#645e5edimgray
#a0a19bdarkgray
Accent
#c8c0c0silver
#27291fdarkslategray
Accent foreground
#2e2828darkslategray
#c4c6b3silver
Destructive
#692402maroon
#fa5a0aorangered
Destructive foreground
#fdbfa0navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#343914darkslategray
#343914darkslategray

Contrast

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

Light mode
Text on background19.73:1AAA
Text on card19.89:1AAA
Primary button6.31:1AA
Secondary button7.48:1AAA
Muted text5.02:1AA
Accent8.13:1AAA
Destructive7.06:1AAA
Dark mode
Text on background19.79:1AAA
Text on card19.37:1AAA
Primary button6.31:1AA
Secondary button8.54:1AAA
Muted text6.63:1AA
Accent8.50:1AAA
Destructive6.53:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 112.603);
  --foreground: oklch(0.135 0.025 113.926);
  --muted: oklch(0.921 0.003 17.218);
  --muted-foreground: oklch(0.487 0.007 17.413);
  --popover: oklch(0.99 0.006 112.664);
  --popover-foreground: oklch(0.107 0.02 113.926);
  --card: oklch(0.99 0.006 112.664);
  --card-foreground: oklch(0.107 0.02 113.926);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.33 0.057 115.977);
  --primary-foreground: oklch(0.788 0.138 116.019);
  --secondary: oklch(0.877 0 180);
  --secondary-foreground: oklch(0.361 0 180);
  --accent: oklch(0.815 0.009 17.346);
  --accent-foreground: oklch(0.285 0.009 17.693);
  --destructive: oklch(0.361 0.107 42.096);
  --destructive-foreground: oklch(0.854 0.083 47.725);
  --ring: oklch(0.33 0.057 115.977);
  --chart-1: oklch(0.33 0.057 115.977);
  --chart-2: oklch(0.877 0 180);
  --chart-3: oklch(0.815 0.009 17.346);
  --chart-4: oklch(0.9 0 188.746);
  --chart-5: oklch(0.334 0.06 116.13);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.144 0.015 113.392);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.221 0.006 113.039);
  --muted-foreground: oklch(0.707 0.008 112.765);
  --popover: oklch(0.16 0.017 114.126);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.16 0.017 114.126);
  --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.33 0.057 115.977);
  --primary-foreground: oklch(0.788 0.138 116.019);
  --secondary: oklch(0.21 0.006 113.097);
  --secondary-foreground: oklch(0.77 0.016 112.92);
  --accent: oklch(0.275 0.018 113.749);
  --accent-foreground: oklch(0.819 0.026 113.125);
  --destructive: oklch(0.674 0.208 40.044);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.33 0.057 115.977);
  --chart-1: oklch(0.33 0.057 115.977);
  --chart-2: oklch(0.21 0.006 113.097);
  --chart-3: oklch(0.275 0.018 113.749);
  --chart-4: oklch(0.244 0.008 113.152);
  --chart-5: oklch(0.334 0.06 116.13);
}