Primary for shadcn/ui

Primary is a shadcn/ui theme built around an orange primary color (#9f6323) with neutral gray accents (#d5d4d2). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the orange primary (#9f6323) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfaf7snow
#000000black
Foreground
#040301black
#fcfaf8snow
Card
#fdfaf7snow
#000000black
Card foreground
#040301black
#fcfaf8snow
Popover
#fdfaf7snow
#000000black
Popover foreground
#040301black
#fcfaf8snow
Primary
#9f6323sienna
#9f6323sienna
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d5d4d2lightgrey
#231f1ablack
Secondary foreground
#3c3b39darkslategray
#c2b8aesilver
Muted
#f3f0edwhitesmoke
#120f0cblack
Muted foreground
#45403adarkslategray
#c5bfbasilver
Accent
#d5d4d2lightgrey
#231f1ablack
Accent foreground
#3c3b39darkslategray
#c2b8aesilver
Destructive
#a00e0edarkred
#ec2727crimson
Destructive foreground
#fde3e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9f6323sienna
#9f6323sienna

Contrast

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

Light mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button4.90:1AA
Secondary button7.53:1AAA
Muted text9.01:1AAA
Accent7.53:1AAA
Destructive6.76:1AA
Dark mode
Text on background20.16:1AAA
Text on card20.16:1AAA
Primary button4.90:1AA
Secondary button8.41:1AAA
Muted text10.46:1AAA
Accent8.41:1AAA
Destructive4.28:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.005 69.604);
  --foreground: oklch(0.095 0.01 77.031);
  --muted: oklch(0.956 0.005 69.596);
  --muted-foreground: oklch(0.375 0.013 69.292);
  --popover: oklch(0.986 0.005 69.604);
  --popover-foreground: oklch(0.095 0.01 77.031);
  --card: oklch(0.986 0.005 69.604);
  --card-foreground: oklch(0.095 0.01 77.031);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.554 0.109 63.279);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.87 0.002 69.624);
  --secondary-foreground: oklch(0.352 0.004 69.54);
  --accent: oklch(0.87 0.002 69.624);
  --accent-foreground: oklch(0.352 0.004 69.54);
  --destructive: oklch(0.448 0.176 28.283);
  --destructive-foreground: oklch(0.936 0.028 17.668);
  --ring: oklch(0.554 0.109 63.279);
  --chart-1: oklch(0.554 0.109 63.279);
  --chart-2: oklch(0.87 0.002 69.624);
  --chart-3: oklch(0.87 0.002 69.624);
  --chart-4: oklch(0.893 0.002 69.63);
  --chart-5: oklch(0.558 0.113 62.71);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.986 0.003 69.617);
  --muted: oklch(0.173 0.008 69.12);
  --muted-foreground: oklch(0.809 0.01 69.522);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.986 0.003 69.617);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.986 0.003 69.617);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.554 0.109 63.279);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.241 0.01 69.168);
  --secondary-foreground: oklch(0.787 0.018 69.412);
  --accent: oklch(0.241 0.01 69.168);
  --accent-foreground: oklch(0.787 0.018 69.412);
  --destructive: oklch(0.607 0.229 27.494);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.554 0.109 63.279);
  --chart-1: oklch(0.554 0.109 63.279);
  --chart-2: oklch(0.241 0.01 69.168);
  --chart-3: oklch(0.241 0.01 69.168);
  --chart-4: oklch(0.274 0.013 69.131);
  --chart-5: oklch(0.558 0.113 62.71);
}