Shocked for shadcn/ui

Shocked is a shadcn/ui theme built around a green primary color (#587d1c) with green accents (#277d1c). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#587d1c) on a neutral background (#060703).

Color palette

TokenLightDark
Background
#ffffffwhite
#060703black
Foreground
#060802black
#f8f9f6whitesmoke
Card
#fcfcfcsnow
#080a05black
Card foreground
#030401black
#fafbf9snow
Popover
#ffffffwhite
#060703black
Popover foreground
#060802black
#f8f9f6whitesmoke
Primary
#587d1cdarkolivegreen
#587d1cdarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7d721colive
#7d721colive
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f5f4f0whitesmoke
#0f0f0ablack
Muted foreground
#656561dimgray
#9e9d9adarkgray
Accent
#277d1cforestgreen
#277d1cforestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7f1c0bmaroon
#ed4d31tomato
Destructive foreground
#facac2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#587d1cdarkolivegreen
#587d1cdarkolivegreen

Contrast

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

Light mode
Text on background20.12:1AAA
Text on card20.11:1AAA
Primary button4.78:1AA
Secondary button4.87:1AA
Muted text5.31:1AA
Accent5.17:1AA
Destructive6.89:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.12:1AAA
Primary button4.78:1AA
Secondary button4.87:1AA
Muted text7.09:1AAA
Accent5.17:1AA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.128 0.019 123.037);
  --muted: oklch(0.967 0.006 100.421);
  --muted-foreground: oklch(0.506 0.005 100.496);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.128 0.019 123.037);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.101 0.015 123.037);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.544 0.13 128.78);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.547 0.104 101.467);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.52 0.155 141.486);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.393 0.136 32.266);
  --destructive-foreground: oklch(0.879 0.055 29.824);
  --ring: oklch(0.544 0.13 128.78);
  --chart-1: oklch(0.544 0.13 128.78);
  --chart-2: oklch(0.547 0.104 101.467);
  --chart-3: oklch(0.52 0.155 141.486);
  --chart-4: oklch(0.585 0.111 101.439);
  --chart-5: oklch(0.55 0.134 129.012);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.012 123.223);
  --foreground: oklch(0.98 0.004 123.694);
  --muted: oklch(0.166 0.009 101.072);
  --muted-foreground: oklch(0.696 0.005 100.442);
  --popover: oklch(0.124 0.012 123.223);
  --popover-foreground: oklch(0.98 0.004 123.694);
  --card: oklch(0.142 0.014 123.231);
  --card-foreground: oklch(0.986 0.002 123.675);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.544 0.13 128.78);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.547 0.104 101.467);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.52 0.155 141.486);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.64 0.201 32.376);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.544 0.13 128.78);
  --chart-1: oklch(0.544 0.13 128.78);
  --chart-2: oklch(0.547 0.104 101.467);
  --chart-3: oklch(0.52 0.155 141.486);
  --chart-4: oklch(0.585 0.111 101.439);
  --chart-5: oklch(0.55 0.134 129.012);
}