Shocked for shadcn/ui

Shocked is a shadcn/ui theme built around a deep indigo primary color (#1d214e) with deep green accents (#214e1d). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the deep indigo primary (#1d214e) on a neutral background (#010104).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#010104black
Foreground
#04040cblack
#f9f9fbghostwhite
Card
#f8f8fcghostwhite
#010104black
Card foreground
#04040cblack
#f9f9fbghostwhite
Popover
#f8f8fcghostwhite
#010104black
Popover foreground
#04040cblack
#f9f9fbghostwhite
Primary
#1d214emidnightblue
#1d214emidnightblue
Primary foreground
#b8bce5lightsteelblue
#b8bce5lightsteelblue
Secondary
#4e1d21maroon
#4e1d21maroon
Secondary foreground
#e5b8bclightpink
#e5b8bclightpink
Muted
#eae1e2gainsboro
#1e1516black
Muted foreground
#6e5356dimgray
#ac9193rosybrown
Accent
#214e1ddarkgreen
#214e1ddarkgreen
Accent foreground
#bce5b8silver
#bce5b8silver
Destructive
#af1908firebrick
#f42710orangered
Destructive foreground
#feedeclinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1d214emidnightblue
#1d214emidnightblue

Contrast

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

Light mode
Text on background19.33:1AAA
Text on card19.33:1AAA
Primary button8.23:1AAA
Secondary button7.82:1AAA
Muted text5.38:1AA
Accent6.90:1AA
Destructive6.23:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button8.23:1AAA
Secondary button7.82:1AAA
Muted text6.15:1AA
Accent6.90:1AA
Destructive4.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.004 282.136);
  --foreground: oklch(0.113 0.021 276.898);
  --muted: oklch(0.917 0.01 11.49);
  --muted-foreground: oklch(0.472 0.036 12.961);
  --popover: oklch(0.981 0.004 282.136);
  --popover-foreground: oklch(0.113 0.021 276.898);
  --card: oklch(0.981 0.004 282.136);
  --card-foreground: oklch(0.113 0.021 276.898);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.272 0.082 275.614);
  --primary-foreground: oklch(0.806 0.058 280.934);
  --secondary: oklch(0.306 0.074 17.555);
  --secondary-foreground: oklch(0.824 0.052 12.636);
  --accent: oklch(0.38 0.093 142.022);
  --accent-foreground: oklch(0.881 0.074 142.735);
  --destructive: oklch(0.484 0.185 30.476);
  --destructive-foreground: oklch(0.96 0.018 25.155);
  --ring: oklch(0.272 0.082 275.614);
  --chart-1: oklch(0.272 0.082 275.614);
  --chart-2: oklch(0.306 0.074 17.555);
  --chart-3: oklch(0.38 0.093 142.022);
  --chart-4: oklch(0.333 0.083 17.77);
  --chart-5: oklch(0.269 0.087 275.001);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.076 0.016 275.752);
  --foreground: oklch(0.982 0.003 282.166);
  --muted: oklch(0.207 0.015 12.865);
  --muted-foreground: oklch(0.68 0.033 12.309);
  --popover: oklch(0.076 0.016 275.752);
  --popover-foreground: oklch(0.982 0.003 282.166);
  --card: oklch(0.076 0.016 275.752);
  --card-foreground: oklch(0.982 0.003 282.166);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.272 0.082 275.614);
  --primary-foreground: oklch(0.806 0.058 280.934);
  --secondary: oklch(0.306 0.074 17.555);
  --secondary-foreground: oklch(0.824 0.052 12.636);
  --accent: oklch(0.38 0.093 142.022);
  --accent-foreground: oklch(0.881 0.074 142.735);
  --destructive: oklch(0.62 0.237 30.465);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.272 0.082 275.614);
  --chart-1: oklch(0.272 0.082 275.614);
  --chart-2: oklch(0.306 0.074 17.555);
  --chart-3: oklch(0.38 0.093 142.022);
  --chart-4: oklch(0.333 0.083 17.77);
  --chart-5: oklch(0.269 0.087 275.001);
}