Sugary for shadcn/ui

Sugary is a shadcn/ui theme built around a vivid light green primary color (#e3f7a6) with vivid light green accents (#baf7a6). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light green primary (#e3f7a6) on a neutral background (#060703).

Color palette

TokenLightDark
Background
#ffffffwhite
#060703black
Foreground
#000000black
#fdfdfcwhite
Card
#ffffffwhite
#060703black
Card foreground
#000000black
#fdfdfcwhite
Popover
#ffffffwhite
#060703black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#e3f7a6palegoldenrod
#e3f7a6palegoldenrod
Primary foreground
#040500black
#040500black
Secondary
#f7e3a6palegoldenrod
#f7e3a6palegoldenrod
Secondary foreground
#634c09saddlebrown
#634c09saddlebrown
Muted
#f6f3ealinen
#151209black
Muted foreground
#6a634edimgray
#b1aa95darkgray
Accent
#baf7a6palegreen
#baf7a6palegreen
Accent foreground
#010500black
#010500black
Destructive
#d44f11chocolate
#ee682bchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e3f7a6palegoldenrod
#e3f7a6palegoldenrod

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button17.67:1AAA
Secondary button6.42:1AA
Muted text5.37:1AA
Accent16.59:1AAA
Destructive4.25:1AA Large
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button17.67:1AAA
Secondary button6.42:1AA
Muted text8.05:1AAA
Accent16.59:1AAA
Destructive6.66:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.963 0.012 91.515);
  --muted-foreground: oklch(0.499 0.033 91.8);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.943 0.106 119.889);
  --primary-foreground: oklch(0.107 0.022 118.095);
  --secondary: oklch(0.918 0.081 91.807);
  --secondary-foreground: oklch(0.429 0.084 87.935);
  --accent: oklch(0.916 0.124 138.066);
  --accent-foreground: oklch(0.102 0.025 135.265);
  --destructive: oklch(0.601 0.18 40.376);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.943 0.106 119.889);
  --chart-1: oklch(0.943 0.106 119.889);
  --chart-2: oklch(0.918 0.081 91.807);
  --chart-3: oklch(0.916 0.124 138.066);
  --chart-4: oklch(0.93 0.069 91.814);
  --chart-5: oklch(0.946 0.109 119.954);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.016 117.994);
  --foreground: oklch(0.993 0.001 117.845);
  --muted: oklch(0.184 0.017 91.804);
  --muted-foreground: oklch(0.738 0.03 91.705);
  --popover: oklch(0.127 0.016 117.994);
  --popover-foreground: oklch(0.993 0.001 117.845);
  --card: oklch(0.127 0.016 117.994);
  --card-foreground: oklch(0.993 0.001 117.845);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.943 0.106 119.889);
  --primary-foreground: oklch(0.107 0.022 118.095);
  --secondary: oklch(0.918 0.081 91.807);
  --secondary-foreground: oklch(0.429 0.084 87.935);
  --accent: oklch(0.916 0.124 138.066);
  --accent-foreground: oklch(0.102 0.025 135.265);
  --destructive: oklch(0.675 0.18 42.443);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.943 0.106 119.889);
  --chart-1: oklch(0.943 0.106 119.889);
  --chart-2: oklch(0.918 0.081 91.807);
  --chart-3: oklch(0.916 0.124 138.066);
  --chart-4: oklch(0.93 0.069 91.814);
  --chart-5: oklch(0.946 0.109 119.954);
}