Basic for shadcn/ui

Basic is a shadcn/ui theme built around a vivid deep yellow primary color (#413c01) with vivid deep green accents (#264101). The light mode uses a neutral background (#fefefb). Dark mode keeps the vivid deep yellow primary (#413c01) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fefefbwhite
#070703black
Foreground
#040401black
#f9f9f5whitesmoke
Card
#fefefbwhite
#070703black
Card foreground
#040401black
#f9f9f5whitesmoke
Popover
#fefefbwhite
#070703black
Popover foreground
#040401black
#f9f9f5whitesmoke
Primary
#413c01darkolivegreen
#413c01darkolivegreen
Primary foreground
#fae714gold
#fae714gold
Secondary
#411c01maroon
#411c01maroon
Secondary foreground
#fcaf78lightsalmon
#fcaf78lightsalmon
Muted
#f3ece7linen
#18110cblack
Muted foreground
#47423edarkslategray
#c1bcb8silver
Accent
#264101darkgreen
#264101darkgreen
Accent foreground
#9afa14greenyellow
#9afa14greenyellow
Destructive
#d42a0cfirebrick
#f13413orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#413c01darkolivegreen
#413c01darkolivegreen

Contrast

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

Light mode
Text on background20.29:1AAA
Text on card20.29:1AAA
Primary button8.85:1AAA
Secondary button8.30:1AAA
Muted text8.49:1AAA
Accent8.72:1AAA
Destructive5.06:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.13:1AAA
Primary button8.85:1AAA
Secondary button8.30:1AAA
Muted text9.93:1AAA
Accent8.72:1AAA
Destructive3.99:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 102.277);
  --foreground: oklch(0.103 0.014 105.286);
  --muted: oklch(0.948 0.01 58.212);
  --muted-foreground: oklch(0.381 0.01 58.003);
  --popover: oklch(0.996 0.004 102.277);
  --popover-foreground: oklch(0.103 0.014 105.286);
  --card: oklch(0.996 0.004 102.277);
  --card-foreground: oklch(0.103 0.014 105.286);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.349 0.073 103.827);
  --primary-foreground: oklch(0.915 0.19 103.303);
  --secondary: oklch(0.275 0.069 52.045);
  --secondary-foreground: oklch(0.817 0.115 55.881);
  --accent: oklch(0.341 0.092 130.953);
  --accent-foreground: oklch(0.891 0.245 132.128);
  --destructive: oklch(0.564 0.208 31.844);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.349 0.073 103.827);
  --chart-1: oklch(0.349 0.073 103.827);
  --chart-2: oklch(0.275 0.069 52.045);
  --chart-3: oklch(0.341 0.092 130.953);
  --chart-4: oklch(0.313 0.08 50.45);
  --chart-5: oklch(0.353 0.074 103.798);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.012 104.441);
  --foreground: oklch(0.981 0.005 102.289);
  --muted: oklch(0.184 0.015 57.119);
  --muted-foreground: oklch(0.798 0.008 58.22);
  --popover: oklch(0.125 0.012 104.441);
  --popover-foreground: oklch(0.981 0.005 102.289);
  --card: oklch(0.125 0.012 104.441);
  --card-foreground: oklch(0.981 0.005 102.289);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.349 0.073 103.827);
  --primary-foreground: oklch(0.915 0.19 103.303);
  --secondary: oklch(0.275 0.069 52.045);
  --secondary-foreground: oklch(0.817 0.115 55.881);
  --accent: oklch(0.341 0.092 130.953);
  --accent-foreground: oklch(0.891 0.245 132.128);
  --destructive: oklch(0.623 0.227 31.953);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.349 0.073 103.827);
  --chart-1: oklch(0.349 0.073 103.827);
  --chart-2: oklch(0.275 0.069 52.045);
  --chart-3: oklch(0.341 0.092 130.953);
  --chart-4: oklch(0.313 0.08 50.45);
  --chart-5: oklch(0.353 0.074 103.798);
}