Sugary for shadcn/ui

Sugary is a shadcn/ui theme built around a muted deep teal primary color (#2f463b) with muted deep teal accents (#2f4646). The light mode uses a neutral background (#fbfefc). Dark mode keeps the muted deep teal primary (#2f463b) on a teal-tinted background (#050b08).

Color palette

TokenLightDark
Background
#fbfefcwhite
#050b08black
Foreground
#000000black
#f9fbfamintcream
Card
#fbfefcwhite
#050b08black
Card foreground
#000000black
#f9fbfamintcream
Popover
#fbfefcwhite
#050b08black
Popover foreground
#000000black
#f9fbfamintcream
Primary
#2f463bdarkslategray
#2f463bdarkslategray
Primary foreground
#cbdcd4lightgrey
#cbdcd4lightgrey
Secondary
#2f462fdarkslategray
#2f462fdarkslategray
Secondary foreground
#cbdccblightgrey
#cbdccblightgrey
Muted
#d5e7d5gainsboro
#182a18black
Muted foreground
#505850darkslategray
#a7afa7darkgray
Accent
#2f4646darkslategray
#2f4646darkslategray
Accent foreground
#cbdcdclightgrey
#cbdcdclightgrey
Destructive
#962f0dsaddlebrown
#eb4e19orangered
Destructive foreground
#fce2d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f463bdarkslategray
#2f463bdarkslategray

Contrast

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

Light mode
Text on background20.64:1AAA
Text on card20.64:1AAA
Primary button7.11:1AAA
Secondary button7.15:1AAA
Muted text5.67:1AA
Accent7.06:1AAA
Destructive6.26:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button7.11:1AAA
Secondary button7.15:1AAA
Muted text6.73:1AA
Accent7.06:1AAA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 165.072);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.909 0.031 145.317);
  --muted-foreground: oklch(0.451 0.017 145.284);
  --popover: oklch(0.994 0.003 165.072);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.003 165.072);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.372 0.036 162.316);
  --primary-foreground: oklch(0.88 0.022 164.472);
  --secondary: oklch(0.369 0.049 144.498);
  --secondary-foreground: oklch(0.878 0.03 145.314);
  --accent: oklch(0.376 0.029 195.988);
  --accent-foreground: oklch(0.882 0.019 196.821);
  --destructive: oklch(0.457 0.144 36.88);
  --destructive-foreground: oklch(0.931 0.031 39.338);
  --ring: oklch(0.372 0.036 162.316);
  --chart-1: oklch(0.372 0.036 162.316);
  --chart-2: oklch(0.369 0.049 144.498);
  --chart-3: oklch(0.376 0.029 195.988);
  --chart-4: oklch(0.4 0.054 144.475);
  --chart-5: oklch(0.376 0.04 161.892);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.013 165.211);
  --foreground: oklch(0.986 0.003 165.07);
  --muted: oklch(0.264 0.04 144.322);
  --muted-foreground: oklch(0.745 0.015 145.421);
  --popover: oklch(0.139 0.013 165.211);
  --popover-foreground: oklch(0.986 0.003 165.07);
  --card: oklch(0.139 0.013 165.211);
  --card-foreground: oklch(0.986 0.003 165.07);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.372 0.036 162.316);
  --primary-foreground: oklch(0.88 0.022 164.472);
  --secondary: oklch(0.369 0.049 144.498);
  --secondary-foreground: oklch(0.878 0.03 145.314);
  --accent: oklch(0.376 0.029 195.988);
  --accent-foreground: oklch(0.882 0.019 196.821);
  --destructive: oklch(0.636 0.202 36.738);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.372 0.036 162.316);
  --chart-1: oklch(0.372 0.036 162.316);
  --chart-2: oklch(0.369 0.049 144.498);
  --chart-3: oklch(0.376 0.029 195.988);
  --chart-4: oklch(0.4 0.054 144.475);
  --chart-5: oklch(0.376 0.04 161.892);
}