Surprised for shadcn/ui

Surprised is a shadcn/ui theme built around a green primary color (#3f893e) with purple accents (#883e89). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#3f893e) on a neutral background (#030802).

Color palette

TokenLightDark
Background
#fbfefbwhite
#030802black
Foreground
#040c04black
#f8fbf8mintcream
Card
#f6fdf6mintcream
#040c04black
Card foreground
#030802black
#fcfdfcwhite
Popover
#f6fdf6mintcream
#040c04black
Popover foreground
#030802black
#fcfdfcwhite
Primary
#3f893eseagreen
#3f893eseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#883e89rebeccapurple
#883e89rebeccapurple
Secondary foreground
#fdfbfdsnow
#fdfbfdsnow
Muted
#f5ebf5whitesmoke
#140a14black
Muted foreground
#5e4a5edimgray
#b5a1b5darkgray
Accent
#883e89rebeccapurple
#883e89rebeccapurple
Accent foreground
#fdfbfdsnow
#fdfbfdsnow
Destructive
#8b1a09darkred
#dd2a0eorangered
Destructive foreground
#fcd1capink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3f893eseagreen
#3f893eseagreen

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.60:1AAA
Primary button4.31:1AA Large
Secondary button6.59:1AA
Muted text6.88:1AA
Accent6.59:1AA
Destructive6.71:1AA
Dark mode
Text on background19.40:1AAA
Text on card19.47:1AAA
Primary button4.31:1AA Large
Secondary button6.59:1AA
Muted text8.04:1AAA
Accent6.59:1AA
Destructive4.78:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.006 145.059);
  --foreground: oklch(0.139 0.025 143.557);
  --muted: oklch(0.95 0.017 325.225);
  --muted-foreground: oklch(0.437 0.041 325.728);
  --popover: oklch(0.988 0.012 145.017);
  --popover-foreground: oklch(0.122 0.022 143.56);
  --card: oklch(0.988 0.012 145.017);
  --card-foreground: oklch(0.122 0.022 143.56);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.565 0.133 143.271);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.489 0.141 326.834);
  --secondary-foreground: oklch(0.992 0.003 325.123);
  --accent: oklch(0.489 0.141 326.834);
  --accent-foreground: oklch(0.992 0.003 325.123);
  --destructive: oklch(0.415 0.15 31.544);
  --destructive-foreground: oklch(0.895 0.049 28.314);
  --ring: oklch(0.565 0.133 143.271);
  --chart-1: oklch(0.565 0.133 143.271);
  --chart-2: oklch(0.489 0.141 326.834);
  --chart-3: oklch(0.489 0.141 326.834);
  --chart-4: oklch(0.515 0.15 326.845);
  --chart-5: oklch(0.572 0.141 143.17);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.022 143.56);
  --foreground: oklch(0.986 0.005 145.064);
  --muted: oklch(0.165 0.026 326.116);
  --muted-foreground: oklch(0.732 0.036 325.439);
  --popover: oklch(0.139 0.025 143.557);
  --popover-foreground: oklch(0.993 0.003 145.082);
  --card: oklch(0.139 0.025 143.557);
  --card-foreground: oklch(0.993 0.003 145.082);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.565 0.133 143.271);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.489 0.141 326.834);
  --secondary-foreground: oklch(0.992 0.003 325.123);
  --accent: oklch(0.489 0.141 326.834);
  --accent-foreground: oklch(0.992 0.003 325.123);
  --destructive: oklch(0.579 0.216 31.362);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.565 0.133 143.271);
  --chart-1: oklch(0.565 0.133 143.271);
  --chart-2: oklch(0.489 0.141 326.834);
  --chart-3: oklch(0.489 0.141 326.834);
  --chart-4: oklch(0.515 0.15 326.845);
  --chart-5: oklch(0.572 0.141 143.17);
}