Stunning for shadcn/ui

Stunning is a shadcn/ui theme built around a purple primary color (#9a2bb6) with teal accents (#2bb69a). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#9a2bb6) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#ffffffwhite
#030104black
Foreground
#0b030cblack
#fbf9fbsnow
Card
#ffffffwhite
#030104black
Card foreground
#0b030cblack
#fbf9fbsnow
Popover
#ffffffwhite
#030104black
Popover foreground
#0b030cblack
#fbf9fbsnow
Primary
#9a2bb6darkorchid
#9a2bb6darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#b69a2bperu
#b69a2bperu
Secondary foreground
#110e04black
#110e04black
Muted
#e7e5dfgainsboro
#201e18black
Muted foreground
#555244darkolivegreen
#bbb8aadarkgray
Accent
#2bb69alightseagreen
#2bb69alightseagreen
Accent foreground
#04110eblack
#04110eblack
Destructive
#b53308firebrick
#e6410aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9a2bb6darkorchid
#9a2bb6darkorchid

Contrast

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

Light mode
Text on background20.33:1AAA
Text on card20.33:1AAA
Primary button6.20:1AA
Secondary button7.01:1AAA
Muted text6.23:1AA
Accent7.54:1AAA
Destructive6.09:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button6.20:1AA
Secondary button7.01:1AAA
Muted text8.35:1AAA
Accent7.54:1AAA
Destructive4.09:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.12 0.031 321.161);
  --muted: oklch(0.922 0.008 95.135);
  --muted-foreground: oklch(0.436 0.022 95.54);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.12 0.031 321.161);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.12 0.031 321.161);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.521 0.216 318.549);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.692 0.128 94.274);
  --secondary-foreground: oklch(0.163 0.022 97.548);
  --accent: oklch(0.697 0.121 175.465);
  --accent-foreground: oklch(0.162 0.021 180.566);
  --destructive: oklch(0.516 0.173 35.803);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.521 0.216 318.549);
  --chart-1: oklch(0.521 0.216 318.549);
  --chart-2: oklch(0.692 0.128 94.274);
  --chart-3: oklch(0.697 0.121 175.465);
  --chart-4: oklch(0.726 0.135 94.24);
  --chart-5: oklch(0.523 0.222 318.418);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.014 320.868);
  --foreground: oklch(0.983 0.004 319.445);
  --muted: oklch(0.236 0.011 95.514);
  --muted-foreground: oklch(0.78 0.019 95.306);
  --popover: oklch(0.086 0.014 320.868);
  --popover-foreground: oklch(0.983 0.004 319.445);
  --card: oklch(0.086 0.014 320.868);
  --card-foreground: oklch(0.983 0.004 319.445);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.521 0.216 318.549);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.692 0.128 94.274);
  --secondary-foreground: oklch(0.163 0.022 97.548);
  --accent: oklch(0.697 0.121 175.465);
  --accent-foreground: oklch(0.162 0.021 180.566);
  --destructive: oklch(0.614 0.209 35.463);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.521 0.216 318.549);
  --chart-1: oklch(0.521 0.216 318.549);
  --chart-2: oklch(0.692 0.128 94.274);
  --chart-3: oklch(0.697 0.121 175.465);
  --chart-4: oklch(0.726 0.135 94.24);
  --chart-5: oklch(0.523 0.222 318.418);
}