Elegant for shadcn/ui

Elegant is a shadcn/ui theme built around a deep green primary color (#0e1b09) with deep pink accents (#1b090e). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the deep green primary (#0e1b09) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#070a05black
Foreground
#040802black
#f9fbf8mintcream
Card
#f5fcf3honeydew
#090d07black
Card foreground
#020401black
#fcfdfcwhite
Popover
#f5fcf3honeydew
#090d07black
Popover foreground
#020401black
#fcfdfcwhite
Primary
#0e1b09black
#0e1b09black
Primary foreground
#5eb33dolivedrab
#5eb33dolivedrab
Secondary
#090e1bblack
#090e1bblack
Secondary foreground
#8299d4cornflowerblue
#8299d4cornflowerblue
Muted
#d4d8e2gainsboro
#1d212bdarkslategray
Muted foreground
#5d626fdimgray
#9095a2lightslategray
Accent
#1b090eblack
#1b090eblack
Accent foreground
#d48299palevioletred
#d48299palevioletred
Destructive
#8b1604darkred
#fa4e33tomato
Destructive foreground
#fdcbc3pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e1b09black
#0e1b09black

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.72:1AAA
Primary button6.79:1AA
Secondary button6.83:1AA
Muted text4.28:1AA Large
Accent6.82:1AA
Destructive6.54:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.16:1AAA
Primary button6.79:1AA
Secondary button6.83:1AA
Muted text5.39:1AA
Accent6.82:1AA
Destructive3.39:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.01 136.638);
  --foreground: oklch(0.125 0.021 134.952);
  --muted: oklch(0.883 0.015 268.668);
  --muted-foreground: oklch(0.496 0.022 268.424);
  --popover: oklch(0.984 0.015 136.653);
  --popover-foreground: oklch(0.099 0.017 134.952);
  --card: oklch(0.984 0.015 136.653);
  --card-foreground: oklch(0.099 0.017 134.952);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.203 0.037 137.374);
  --primary-foreground: oklch(0.688 0.174 138.095);
  --secondary: oklch(0.166 0.028 266.901);
  --secondary-foreground: oklch(0.688 0.092 267.408);
  --accent: oklch(0.17 0.032 2.867);
  --accent-foreground: oklch(0.699 0.105 1.857);
  --destructive: oklch(0.411 0.154 31.568);
  --destructive-foreground: oklch(0.884 0.059 28.417);
  --ring: oklch(0.203 0.037 137.374);
  --chart-1: oklch(0.203 0.037 137.374);
  --chart-2: oklch(0.166 0.028 266.901);
  --chart-3: oklch(0.17 0.032 2.867);
  --chart-4: oklch(0.195 0.038 266.592);
  --chart-5: oklch(0.204 0.04 137.4);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.014 135.64);
  --foreground: oklch(0.987 0.005 136.623);
  --muted: oklch(0.247 0.02 268.017);
  --muted-foreground: oklch(0.67 0.02 268.553);
  --popover: oklch(0.153 0.016 136.1);
  --popover-foreground: oklch(0.993 0.002 136.616);
  --card: oklch(0.153 0.016 136.1);
  --card-foreground: oklch(0.993 0.002 136.616);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.203 0.037 137.374);
  --primary-foreground: oklch(0.688 0.174 138.095);
  --secondary: oklch(0.166 0.028 266.901);
  --secondary-foreground: oklch(0.688 0.092 267.408);
  --accent: oklch(0.17 0.032 2.867);
  --accent-foreground: oklch(0.699 0.105 1.857);
  --destructive: oklch(0.662 0.213 31.602);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.203 0.037 137.374);
  --chart-1: oklch(0.203 0.037 137.374);
  --chart-2: oklch(0.166 0.028 266.901);
  --chart-3: oklch(0.17 0.032 2.867);
  --chart-4: oklch(0.195 0.038 266.592);
  --chart-5: oklch(0.204 0.04 137.4);
}