Dessert for shadcn/ui

Dessert is a shadcn/ui theme built around a neutral gray primary color (#e4e2e2) with neutral gray accents (#e4e3e2). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the neutral gray primary (#e4e2e2) on a red-tinted background (#0c0305).

Color palette

TokenLightDark
Background
#fcf8f9snow
#0c0305black
Foreground
#0d0204black
#faf9fasnow
Card
#fcf8f9snow
#0c0305black
Card foreground
#0d0204black
#faf9fasnow
Popover
#fcf8f9snow
#0c0305black
Popover foreground
#0d0204black
#faf9fasnow
Primary
#e4e2e2gainsboro
#e4e2e2gainsboro
Primary foreground
#4d4748darkslategray
#4d4748darkslategray
Secondary
#e4e2e3gainsboro
#e4e2e3gainsboro
Secondary foreground
#4d474bdarkslategray
#4d474bdarkslategray
Muted
#e5e1e4gainsboro
#1e1a1dblack
Muted foreground
#675f65dimgray
#a0989ddarkgray
Accent
#e4e3e2gainsboro
#e4e3e2gainsboro
Accent foreground
#4d4947darkslategray
#4d4947darkslategray
Destructive
#c23a00firebrick
#f04800orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e4e2e2gainsboro
#e4e2e2gainsboro

Contrast

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

Light mode
Text on background19.40:1AAA
Text on card19.40:1AAA
Primary button7.03:1AAA
Secondary button7.01:1AAA
Muted text4.76:1AA
Accent6.92:1AA
Destructive5.38:1AA
Dark mode
Text on background19.37:1AAA
Text on card19.37:1AAA
Primary button7.03:1AAA
Secondary button7.01:1AAA
Muted text6.12:1AA
Accent6.92:1AA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 5.548);
  --foreground: oklch(0.115 0.03 6.768);
  --muted: oklch(0.913 0.006 337.403);
  --muted-foreground: oklch(0.496 0.013 337.785);
  --popover: oklch(0.982 0.004 5.548);
  --popover-foreground: oklch(0.115 0.03 6.768);
  --card: oklch(0.982 0.004 5.548);
  --card-foreground: oklch(0.115 0.03 6.768);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.914 0.002 5.519);
  --primary-foreground: oklch(0.404 0.008 5.966);
  --secondary: oklch(0.914 0.003 337.334);
  --secondary-foreground: oklch(0.405 0.01 337.764);
  --accent: oklch(0.915 0.002 48.725);
  --accent-foreground: oklch(0.408 0.006 48.568);
  --destructive: oklch(0.545 0.18 37.504);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.914 0.002 5.519);
  --chart-1: oklch(0.914 0.002 5.519);
  --chart-2: oklch(0.914 0.003 337.334);
  --chart-3: oklch(0.915 0.002 48.725);
  --chart-4: oklch(0.938 0.002 337.314);
  --chart-5: oklch(0.913 0.004 5.572);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.021 6.194);
  --foreground: oklch(0.984 0.001 5.481);
  --muted: oklch(0.223 0.009 338.054);
  --muted-foreground: oklch(0.687 0.012 337.613);
  --popover: oklch(0.12 0.021 6.194);
  --popover-foreground: oklch(0.984 0.001 5.481);
  --card: oklch(0.12 0.021 6.194);
  --card-foreground: oklch(0.984 0.001 5.481);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.914 0.002 5.519);
  --primary-foreground: oklch(0.404 0.008 5.966);
  --secondary: oklch(0.914 0.003 337.334);
  --secondary-foreground: oklch(0.405 0.01 337.764);
  --accent: oklch(0.915 0.002 48.725);
  --accent-foreground: oklch(0.408 0.006 48.568);
  --destructive: oklch(0.637 0.213 37.006);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.914 0.002 5.519);
  --chart-1: oklch(0.914 0.002 5.519);
  --chart-2: oklch(0.914 0.003 337.334);
  --chart-3: oklch(0.915 0.002 48.725);
  --chart-4: oklch(0.938 0.002 337.314);
  --chart-5: oklch(0.913 0.004 5.572);
}