Sugary for shadcn/ui

Sugary is a shadcn/ui theme built around a light violet primary color (#beb2dc) with light green accents (#d0dcb2). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the light violet primary (#beb2dc) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#fcfbfewhite
#040307black
Foreground
#020104black
#f9f9fbghostwhite
Card
#fcfbfewhite
#040307black
Card foreground
#020104black
#f9f9fbghostwhite
Popover
#fcfbfewhite
#040307black
Popover foreground
#020104black
#f9f9fbghostwhite
Primary
#beb2dclightsteelblue
#beb2dclightsteelblue
Primary foreground
#261c3fmidnightblue
#261c3fmidnightblue
Secondary
#d0dcb2palegoldenrod
#d0dcb2palegoldenrod
Secondary foreground
#353f1cdarkslategray
#353f1cdarkslategray
Muted
#f4f7eewhitesmoke
#0f1108black
Muted foreground
#555b49darkolivegreen
#b1b6a4darkgray
Accent
#d0dcb2palegoldenrod
#d0dcb2palegoldenrod
Accent foreground
#353f1cdarkslategray
#353f1cdarkslategray
Destructive
#cb3c10firebrick
#e74413orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#beb2dclightsteelblue
#beb2dclightsteelblue

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button7.99:1AAA
Secondary button7.76:1AAA
Muted text6.49:1AA
Accent7.76:1AAA
Destructive5.01:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button7.99:1AAA
Secondary button7.76:1AAA
Muted text9.13:1AAA
Accent7.76:1AAA
Destructive4.00: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.989 0.004 299.233);
  --foreground: oklch(0.077 0.019 299.357);
  --muted: oklch(0.971 0.012 119.518);
  --muted-foreground: oklch(0.46 0.029 120.396);
  --popover: oklch(0.989 0.004 299.233);
  --popover-foreground: oklch(0.077 0.019 299.357);
  --card: oklch(0.989 0.004 299.233);
  --card-foreground: oklch(0.077 0.019 299.357);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.786 0.061 297.955);
  --primary-foreground: oklch(0.26 0.064 294.58);
  --secondary: oklch(0.875 0.058 120.464);
  --secondary-foreground: oklch(0.351 0.056 122.361);
  --accent: oklch(0.875 0.058 120.464);
  --accent-foreground: oklch(0.351 0.056 122.361);
  --destructive: oklch(0.563 0.186 35.559);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.786 0.061 297.955);
  --chart-1: oklch(0.786 0.061 297.955);
  --chart-2: oklch(0.875 0.058 120.464);
  --chart-3: oklch(0.875 0.058 120.464);
  --chart-4: oklch(0.892 0.05 120.281);
  --chart-5: oklch(0.783 0.066 297.838);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.017 299.337);
  --foreground: oklch(0.982 0.003 299.244);
  --muted: oklch(0.173 0.018 121.054);
  --muted-foreground: oklch(0.768 0.026 119.878);
  --popover: oklch(0.103 0.017 299.337);
  --popover-foreground: oklch(0.982 0.003 299.244);
  --card: oklch(0.103 0.017 299.337);
  --card-foreground: oklch(0.982 0.003 299.244);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.786 0.061 297.955);
  --primary-foreground: oklch(0.26 0.064 294.58);
  --secondary: oklch(0.875 0.058 120.464);
  --secondary-foreground: oklch(0.351 0.056 122.361);
  --accent: oklch(0.875 0.058 120.464);
  --accent-foreground: oklch(0.351 0.056 122.361);
  --destructive: oklch(0.62 0.207 35.434);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.786 0.061 297.955);
  --chart-1: oklch(0.786 0.061 297.955);
  --chart-2: oklch(0.875 0.058 120.464);
  --chart-3: oklch(0.875 0.058 120.464);
  --chart-4: oklch(0.892 0.05 120.281);
  --chart-5: oklch(0.783 0.066 297.838);
}