Sweets for shadcn/ui

Sweets is a shadcn/ui theme built around a vivid purple primary color (#f73afd) with vivid green accents (#41fd3a). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the vivid purple primary (#f73afd) on a purple-tinted background (#0b040b).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#0b040bblack
Foreground
#140515black
#f9f5f9whitesmoke
Card
#fcf8fcsnow
#0b040bblack
Card foreground
#140515black
#f9f5f9whitesmoke
Popover
#fcf8fcsnow
#0b040bblack
Popover foreground
#140515black
#f9f5f9whitesmoke
Primary
#f73afdmagenta
#f73afdmagenta
Primary foreground
#050005black
#050005black
Secondary
#41fd3alimegreen
#41fd3alimegreen
Secondary foreground
#000500black
#000500black
Muted
#cee4celightgrey
#1c311bblack
Muted foreground
#505350darkslategray
#acafacdarkgray
Accent
#41fd3alimegreen
#41fd3alimegreen
Accent foreground
#000500black
#000500black
Destructive
#b34114firebrick
#ea7243tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f73afdmagenta
#f73afdmagenta

Contrast

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

Light mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button6.90:1AA
Secondary button15.00:1AAA
Muted text5.79:1AA
Accent15.00:1AAA
Destructive5.70:1AA
Dark mode
Text on background18.75:1AAA
Text on card18.75:1AAA
Primary button6.90:1AA
Secondary button15.00:1AAA
Muted text6.27:1AA
Accent15.00:1AAA
Destructive6.99:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 324.66);
  --foreground: oklch(0.151 0.042 326.214);
  --muted: oklch(0.896 0.038 144.344);
  --muted-foreground: oklch(0.439 0.007 144.521);
  --popover: oklch(0.983 0.006 324.66);
  --popover-foreground: oklch(0.151 0.042 326.214);
  --card: oklch(0.983 0.006 324.66);
  --card-foreground: oklch(0.151 0.042 326.214);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.707 0.293 326.62);
  --primary-foreground: oklch(0.081 0.036 327.492);
  --secondary: oklch(0.869 0.271 142.472);
  --secondary-foreground: oklch(0.101 0.033 141.576);
  --accent: oklch(0.869 0.271 142.472);
  --accent-foreground: oklch(0.101 0.033 141.576);
  --destructive: oklch(0.529 0.158 39.095);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.707 0.293 326.62);
  --chart-1: oklch(0.707 0.293 326.62);
  --chart-2: oklch(0.869 0.271 142.472);
  --chart-3: oklch(0.869 0.271 142.472);
  --chart-4: oklch(0.873 0.259 142.555);
  --chart-5: oklch(0.711 0.298 326.629);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.022 325.856);
  --foreground: oklch(0.975 0.006 324.66);
  --muted: oklch(0.289 0.048 143.476);
  --muted-foreground: oklch(0.751 0.006 144.569);
  --popover: oklch(0.126 0.022 325.856);
  --popover-foreground: oklch(0.975 0.006 324.66);
  --card: oklch(0.126 0.022 325.856);
  --card-foreground: oklch(0.975 0.006 324.66);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.707 0.293 326.62);
  --primary-foreground: oklch(0.081 0.036 327.492);
  --secondary: oklch(0.869 0.271 142.472);
  --secondary-foreground: oklch(0.101 0.033 141.576);
  --accent: oklch(0.869 0.271 142.472);
  --accent-foreground: oklch(0.101 0.033 141.576);
  --destructive: oklch(0.686 0.161 41.241);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.707 0.293 326.62);
  --chart-1: oklch(0.707 0.293 326.62);
  --chart-2: oklch(0.869 0.271 142.472);
  --chart-3: oklch(0.869 0.271 142.472);
  --chart-4: oklch(0.873 0.259 142.555);
  --chart-5: oklch(0.711 0.298 326.629);
}