Surprised for shadcn/ui

Surprised is a shadcn/ui theme built around a green primary color (#80dc5b) with violet accents (#b85bdc). The light mode uses a neutral background (#fcfefb). Dark mode keeps the green primary (#80dc5b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfefbwhite
#000000black
Foreground
#071202black
#fcfdfcwhite
Card
#f9fcf7mintcream
#030303black
Card foreground
#050e02black
#ffffffwhite
Popover
#fcfefbwhite
#000000black
Popover foreground
#071202black
#fcfdfcwhite
Primary
#80dc5byellowgreen
#80dc5byellowgreen
Primary foreground
#020401black
#020401black
Secondary
#b85bdcmediumorchid
#b85bdcmediumorchid
Secondary foreground
#000000black
#000000black
Muted
#eeebefwhitesmoke
#131014black
Muted foreground
#6a5d6fdimgray
#9d90a2darkgray
Accent
#b85bdcmediumorchid
#b85bdcmediumorchid
Accent foreground
#000000black
#000000black
Destructive
#9a3b04saddlebrown
#ef5b06orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#80dc5byellowgreen
#80dc5byellowgreen

Contrast

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

Light mode
Text on background18.85:1AAA
Text on card19.01:1AAA
Primary button12.07:1AAA
Secondary button5.55:1AA
Muted text5.21:1AA
Accent5.55:1AA
Destructive6.98:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.67:1AAA
Primary button12.07:1AAA
Secondary button5.55:1AA
Muted text6.25:1AA
Accent5.55:1AA
Destructive3.40:1AA Large

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.004 136.62);
  --foreground: oklch(0.167 0.04 135.297);
  --muted: oklch(0.944 0.007 316.588);
  --muted-foreground: oklch(0.497 0.033 316.415);
  --popover: oklch(0.994 0.004 136.62);
  --popover-foreground: oklch(0.167 0.04 135.297);
  --card: oklch(0.988 0.008 136.632);
  --card-foreground: oklch(0.148 0.035 134.576);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.81 0.188 137.83);
  --primary-foreground: oklch(0.1 0.019 134.7);
  --secondary: oklch(0.635 0.202 315.281);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.635 0.202 315.281);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.479 0.139 43.12);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.81 0.188 137.83);
  --chart-1: oklch(0.81 0.188 137.83);
  --chart-2: oklch(0.635 0.202 315.281);
  --chart-3: oklch(0.635 0.202 315.281);
  --chart-4: oklch(0.66 0.188 315.514);
  --chart-5: oklch(0.816 0.195 137.909);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.002 136.614);
  --muted: oklch(0.177 0.01 316.445);
  --muted-foreground: oklch(0.67 0.031 316.476);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.002 136.614);
  --card: oklch(0.092 0 180);
  --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.81 0.188 137.83);
  --primary-foreground: oklch(0.1 0.019 134.7);
  --secondary: oklch(0.635 0.202 315.281);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.635 0.202 315.281);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.657 0.197 41.969);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.81 0.188 137.83);
  --chart-1: oklch(0.81 0.188 137.83);
  --chart-2: oklch(0.635 0.202 315.281);
  --chart-3: oklch(0.635 0.202 315.281);
  --chart-4: oklch(0.66 0.188 315.514);
  --chart-5: oklch(0.816 0.195 137.909);
}