Cheery for shadcn/ui

Cheery is a shadcn/ui theme built around a muted violet primary color (#968bb6) with muted purple accents (#ac8bb6). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#968bb6) on a violet-tinted background (#06040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#06040bblack
Foreground
#090614black
#f6f5f9whitesmoke
Card
#fcfcfcsnow
#08050fblack
Card foreground
#070410black
#f9f8fbghostwhite
Popover
#ffffffwhite
#06040bblack
Popover foreground
#090614black
#f6f5f9whitesmoke
Primary
#968bb6darkgray
#968bb6darkgray
Primary foreground
#070609black
#070609black
Secondary
#8b96b6darkgray
#8b96b6darkgray
Secondary foreground
#060709black
#060709black
Muted
#dce0eagainsboro
#151923black
Muted foreground
#5d5f65dimgray
#9a9ca2darkgray
Accent
#ac8bb6darkgray
#ac8bb6darkgray
Accent foreground
#090609black
#090609black
Destructive
#7c1f03maroon
#f9430borangered
Destructive foreground
#fdc5b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#968bb6darkgray
#968bb6darkgray

Contrast

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

Light mode
Text on background20.04:1AAA
Text on card19.87:1AAA
Primary button6.41:1AA
Secondary button6.83:1AA
Muted text4.81:1AA
Accent6.82:1AA
Destructive6.69:1AA
Dark mode
Text on background18.78:1AAA
Text on card19.07:1AAA
Primary button6.41:1AA
Secondary button6.83:1AA
Muted text6.41:1AA
Accent6.82:1AA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.135 0.033 294.859);
  --muted: oklch(0.906 0.014 271.258);
  --muted-foreground: oklch(0.486 0.01 271.217);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.135 0.033 294.859);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.125 0.028 296.249);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.662 0.065 296.051);
  --primary-foreground: oklch(0.125 0.009 297.711);
  --secondary: oklch(0.675 0.05 270.576);
  --secondary-foreground: oklch(0.127 0.007 268.794);
  --accent: oklch(0.681 0.072 317.583);
  --accent-foreground: oklch(0.128 0.011 318.514);
  --destructive: oklch(0.391 0.132 35.603);
  --destructive-foreground: oklch(0.87 0.068 37.596);
  --ring: oklch(0.662 0.065 296.051);
  --chart-1: oklch(0.662 0.065 296.051);
  --chart-2: oklch(0.675 0.05 270.576);
  --chart-3: oklch(0.681 0.072 317.583);
  --chart-4: oklch(0.703 0.045 270.697);
  --chart-5: oklch(0.656 0.073 295.788);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.02 297.477);
  --foreground: oklch(0.973 0.006 297.719);
  --muted: oklch(0.213 0.021 270.264);
  --muted-foreground: oklch(0.693 0.009 271.289);
  --popover: oklch(0.116 0.02 297.477);
  --popover-foreground: oklch(0.973 0.006 297.719);
  --card: oklch(0.128 0.023 296.558);
  --card-foreground: oklch(0.982 0.004 297.755);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.662 0.065 296.051);
  --primary-foreground: oklch(0.125 0.009 297.711);
  --secondary: oklch(0.675 0.05 270.576);
  --secondary-foreground: oklch(0.127 0.007 268.794);
  --accent: oklch(0.681 0.072 317.583);
  --accent-foreground: oklch(0.128 0.011 318.514);
  --destructive: oklch(0.648 0.225 34.688);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.662 0.065 296.051);
  --chart-1: oklch(0.662 0.065 296.051);
  --chart-2: oklch(0.675 0.05 270.576);
  --chart-3: oklch(0.681 0.072 317.583);
  --chart-4: oklch(0.703 0.045 270.697);
  --chart-5: oklch(0.656 0.073 295.788);
}