Shocking for shadcn/ui

Shocking is a shadcn/ui theme built around a near-black primary color (#0e0c0d) with near-black accents (#0e0c0c). The light mode uses a neutral background (#fdf7fb). Dark mode keeps the near-black primary (#0e0c0d) on a pink-tinted background (#0c0409).

Color palette

TokenLightDark
Background
#fdf7fbsnow
#0c0409black
Foreground
#0c0409black
#fdfcfdwhite
Card
#fdf7fbsnow
#0c0409black
Card foreground
#0c0409black
#fdfcfdwhite
Popover
#fdf7fbsnow
#0c0409black
Popover foreground
#0c0409black
#fdfcfdwhite
Primary
#0e0c0dblack
#0e0c0dblack
Primary foreground
#aca0a7darkgray
#aca0a7darkgray
Secondary
#0d0c0eblack
#0d0c0eblack
Secondary foreground
#aaa0acdarkgray
#aaa0acdarkgray
Muted
#e0dbe1gainsboro
#241e24black
Muted foreground
#4f3d52darkslategray
#bfadc2silver
Accent
#0e0c0cblack
#0e0c0cblack
Accent foreground
#aca0a1darkgray
#aca0a1darkgray
Destructive
#cc2f0ffirebrick
#d53110firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e0c0dblack
#0e0c0dblack

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button7.75:1AAA
Secondary button7.74:1AAA
Muted text7.23:1AAA
Accent7.71:1AAA
Destructive5.28:1AA
Dark mode
Text on background19.83:1AAA
Text on card19.83:1AAA
Primary button7.75:1AAA
Secondary button7.74:1AAA
Muted text7.76:1AAA
Accent7.71:1AAA
Destructive4.89:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 338.89);
  --foreground: oklch(0.123 0.022 339.183);
  --muted: oklch(0.896 0.011 321.626);
  --muted-foreground: oklch(0.387 0.043 321.883);
  --popover: oklch(0.982 0.008 338.89);
  --popover-foreground: oklch(0.123 0.022 339.183);
  --card: oklch(0.982 0.008 338.89);
  --card-foreground: oklch(0.123 0.022 339.183);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.156 0.004 339.236);
  --primary-foreground: oklch(0.717 0.018 339.257);
  --secondary: oklch(0.156 0.005 321.672);
  --secondary-foreground: oklch(0.717 0.022 321.676);
  --accent: oklch(0.156 0.003 8.231);
  --accent-foreground: oklch(0.715 0.015 8.252);
  --destructive: oklch(0.553 0.197 32.593);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.156 0.004 339.236);
  --chart-1: oklch(0.156 0.004 339.236);
  --chart-2: oklch(0.156 0.005 321.672);
  --chart-3: oklch(0.156 0.003 8.231);
  --chart-4: oklch(0.191 0.007 321.692);
  --chart-5: oklch(0.156 0.005 339.456);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.023 339.231);
  --foreground: oklch(0.992 0.001 338.743);
  --muted: oklch(0.244 0.015 321.76);
  --muted-foreground: oklch(0.77 0.036 321.722);
  --popover: oklch(0.123 0.023 339.231);
  --popover-foreground: oklch(0.992 0.001 338.743);
  --card: oklch(0.123 0.023 339.231);
  --card-foreground: oklch(0.992 0.001 338.743);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.156 0.004 339.236);
  --primary-foreground: oklch(0.717 0.018 339.257);
  --secondary: oklch(0.156 0.005 321.672);
  --secondary-foreground: oklch(0.717 0.022 321.676);
  --accent: oklch(0.156 0.003 8.231);
  --accent-foreground: oklch(0.715 0.015 8.252);
  --destructive: oklch(0.572 0.204 32.568);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.156 0.004 339.236);
  --chart-1: oklch(0.156 0.004 339.236);
  --chart-2: oklch(0.156 0.005 321.672);
  --chart-3: oklch(0.156 0.003 8.231);
  --chart-4: oklch(0.191 0.007 321.692);
  --chart-5: oklch(0.156 0.005 339.456);
}