Diet for shadcn/ui

Diet is a shadcn/ui theme built around a vivid purple primary color (#e407d9) with vivid pink accents (#e4076a). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the vivid purple primary (#e407d9) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdf6fdsnow
#030203black
Foreground
#0d020dblack
#faf5f9whitesmoke
Card
#fdf2fclavenderblush
#070307black
Card foreground
#090108black
#fbf8fbsnow
Popover
#fdf6fdsnow
#030203black
Popover foreground
#0d020dblack
#faf5f9whitesmoke
Primary
#e407d9magenta
#e407d9magenta
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8007e4darkviolet
#8007e4darkviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dcd9degainsboro
#242126black
Muted foreground
#413748darkslategray
#c0b7c8silver
Accent
#e4076amediumvioletred
#e4076amediumvioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#9d2602firebrick
#fd450dorangered
Destructive foreground
#ffdcd2blanchedalmond
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e407d9magenta
#e407d9magenta

Contrast

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

Light mode
Text on background19.23:1AAA
Text on card18.91:1AAA
Primary button3.95:1AA Large
Secondary button6.84:1AA
Muted text8.03:1AAA
Accent4.64:1AA
Destructive6.08:1AA
Dark mode
Text on background19.24:1AAA
Text on card19.41:1AAA
Primary button3.95:1AA Large
Secondary button6.84:1AA
Muted text8.20:1AAA
Accent4.64:1AA
Destructive3.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.012 327.146);
  --foreground: oklch(0.122 0.038 329.093);
  --muted: oklch(0.888 0.007 310.36);
  --muted-foreground: oklch(0.355 0.031 309.635);
  --popover: oklch(0.982 0.012 327.146);
  --popover-foreground: oklch(0.122 0.038 329.093);
  --card: oklch(0.972 0.017 327.202);
  --card-foreground: oklch(0.106 0.033 328.89);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.639 0.287 331.039);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.506 0.268 299.103);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.591 0.235 5.186);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.458 0.16 34.895);
  --destructive-foreground: oklch(0.921 0.041 37.604);
  --ring: oklch(0.639 0.287 331.039);
  --chart-1: oklch(0.639 0.287 331.039);
  --chart-2: oklch(0.506 0.268 299.103);
  --chart-3: oklch(0.591 0.235 5.186);
  --chart-4: oklch(0.53 0.282 298.989);
  --chart-5: oklch(0.645 0.291 331.089);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.013 327.975);
  --foreground: oklch(0.975 0.007 327.107);
  --muted: oklch(0.254 0.01 310.069);
  --muted-foreground: oklch(0.792 0.025 310.143);
  --popover: oklch(0.088 0.013 327.975);
  --popover-foreground: oklch(0.975 0.007 327.107);
  --card: oklch(0.111 0.016 327.975);
  --card-foreground: oklch(0.983 0.005 327.084);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.639 0.287 331.039);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.506 0.268 299.103);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.591 0.235 5.186);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.656 0.227 34.763);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.639 0.287 331.039);
  --chart-1: oklch(0.639 0.287 331.039);
  --chart-2: oklch(0.506 0.268 299.103);
  --chart-3: oklch(0.591 0.235 5.186);
  --chart-4: oklch(0.53 0.282 298.989);
  --chart-5: oklch(0.645 0.291 331.089);
}