Scared for shadcn/ui

Scared is a shadcn/ui theme built around a purple primary color (#c01bb8) with muted purple accents (#c3b7c2). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the purple primary (#c01bb8) on a neutral background (#040203).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#040203black
Foreground
#150514black
#faf5faghostwhite
Card
#fcf8fcsnow
#070307black
Card foreground
#110410black
#fcf8fcsnow
Popover
#fdfbfdsnow
#040203black
Popover foreground
#150514black
#faf5faghostwhite
Primary
#c01bb8darkorchid
#c01bb8darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2d0d2lightgrey
#352c34darkslategray
Secondary foreground
#3a363adarkslategray
#cec5cethistle
Muted
#e3cfe2gainsboro
#301c2fdarkslategray
Muted foreground
#525252darkslategray
#adadaddarkgray
Accent
#c3b7c2silver
#4d384cdarkslategray
Accent foreground
#272027darkslategray
#e1d6e0gainsboro
Destructive
#721509maroon
#f15641tomato
Destructive foreground
#f9bbb3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c01bb8darkorchid
#c01bb8darkorchid

Contrast

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

Light mode
Text on background19.24:1AAA
Text on card19.03:1AAA
Primary button5.13:1AA
Secondary button7.73:1AAA
Muted text5.30:1AA
Accent8.20:1AAA
Destructive7.01:1AAA
Dark mode
Text on background19.26:1AAA
Text on card19.47:1AAA
Primary button5.13:1AA
Secondary button8.00:1AAA
Muted text6.99:1AA
Accent7.52:1AAA
Destructive6.13:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 327.068);
  --foreground: oklch(0.151 0.042 329.192);
  --muted: oklch(0.876 0.033 327.385);
  --muted-foreground: oklch(0.437 0 180);
  --popover: oklch(0.992 0.003 327.068);
  --popover-foreground: oklch(0.151 0.042 329.192);
  --card: oklch(0.983 0.006 327.098);
  --card-foreground: oklch(0.138 0.037 329.005);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.569 0.244 330.655);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.86 0.005 327.088);
  --secondary-foreground: oklch(0.339 0.007 327.232);
  --accent: oklch(0.792 0.021 327.276);
  --accent-foreground: oklch(0.255 0.015 327.556);
  --destructive: oklch(0.36 0.129 31.059);
  --destructive-foreground: oklch(0.847 0.073 27.254);
  --ring: oklch(0.569 0.244 330.655);
  --chart-1: oklch(0.569 0.244 330.655);
  --chart-2: oklch(0.86 0.005 327.088);
  --chart-3: oklch(0.792 0.021 327.276);
  --chart-4: oklch(0.883 0.004 327.079);
  --chart-5: oklch(0.575 0.25 330.722);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.014 328.051);
  --foreground: oklch(0.975 0.009 327.124);
  --muted: oklch(0.262 0.045 328.492);
  --muted-foreground: oklch(0.749 0 158.199);
  --popover: oklch(0.088 0.014 328.051);
  --popover-foreground: oklch(0.975 0.009 327.124);
  --card: oklch(0.111 0.017 328.051);
  --card-foreground: oklch(0.983 0.006 327.095);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.569 0.244 330.655);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.306 0.019 327.597);
  --secondary-foreground: oklch(0.833 0.016 327.219);
  --accent: oklch(0.371 0.044 328.074);
  --accent-foreground: oklch(0.887 0.019 327.236);
  --destructive: oklch(0.658 0.194 30.465);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.569 0.244 330.655);
  --chart-1: oklch(0.569 0.244 330.655);
  --chart-2: oklch(0.306 0.019 327.597);
  --chart-3: oklch(0.371 0.044 328.074);
  --chart-4: oklch(0.336 0.022 327.614);
  --chart-5: oklch(0.575 0.25 330.722);
}