Intervention for shadcn/ui

Intervention is a shadcn/ui theme built around a vivid yellow primary color (#baae03) with vivid purple accents (#ae03ba). The light mode uses a neutral background (#fcfcf7). Dark mode keeps the vivid yellow primary (#baae03) on a neutral background (#080703).

Color palette

TokenLightDark
Background
#fcfcf7snow
#080703black
Foreground
#111004black
#fbfbf9snow
Card
#fcfcf7snow
#080703black
Card foreground
#111004black
#fbfbf9snow
Popover
#fcfcf7snow
#080703black
Popover foreground
#111004black
#fbfbf9snow
Primary
#baae03darkgoldenrod
#baae03darkgoldenrod
Primary foreground
#000000black
#000000black
Secondary
#03baaelightseagreen
#03baaelightseagreen
Secondary foreground
#000000black
#000000black
Muted
#d2e5e3gainsboro
#1a2d2cdarkslategray
Muted foreground
#424847darkslategray
#b7bdbdsilver
Accent
#ae03badarkviolet
#ae03badarkviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c12101firebrick
#fe411borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#baae03darkgoldenrod
#baae03darkgoldenrod

Contrast

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

Light mode
Text on background18.58:1AAA
Text on card18.58:1AAA
Primary button9.11:1AAA
Secondary button8.62:1AAA
Muted text7.11:1AAA
Accent5.97:1AA
Destructive6.03:1AA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button9.11:1AAA
Secondary button8.62:1AAA
Muted text7.57:1AAA
Accent5.97:1AA
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.006 103.213);
  --foreground: oklch(0.168 0.025 105.55);
  --muted: oklch(0.906 0.02 191.97);
  --muted-foreground: oklch(0.395 0.007 192.043);
  --popover: oklch(0.99 0.006 103.213);
  --popover-foreground: oklch(0.168 0.025 105.55);
  --card: oklch(0.99 0.006 103.213);
  --card-foreground: oklch(0.168 0.025 105.55);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.737 0.155 104.495);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.71 0.124 186.52);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.535 0.249 324.732);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.522 0.197 32.036);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.737 0.155 104.495);
  --chart-1: oklch(0.737 0.155 104.495);
  --chart-2: oklch(0.71 0.124 186.52);
  --chart-3: oklch(0.535 0.249 324.732);
  --chart-4: oklch(0.752 0.131 186.479);
  --chart-5: oklch(0.745 0.158 104.425);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.015 105.609);
  --foreground: oklch(0.987 0.003 103.154);
  --muted: oklch(0.281 0.024 190.548);
  --muted-foreground: oklch(0.794 0.006 192.265);
  --popover: oklch(0.128 0.015 105.609);
  --popover-foreground: oklch(0.987 0.003 103.154);
  --card: oklch(0.128 0.015 105.609);
  --card-foreground: oklch(0.987 0.003 103.154);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.737 0.155 104.495);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.71 0.124 186.52);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.535 0.249 324.732);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.655 0.23 32.752);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.737 0.155 104.495);
  --chart-1: oklch(0.737 0.155 104.495);
  --chart-2: oklch(0.71 0.124 186.52);
  --chart-3: oklch(0.535 0.249 324.732);
  --chart-4: oklch(0.752 0.131 186.479);
  --chart-5: oklch(0.745 0.158 104.425);
}