Fragrant for shadcn/ui

Fragrant is a shadcn/ui theme built around an indigo primary color (#5e64e4) with yellow accents (#e4dd5e). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the indigo primary (#5e64e4) on an indigo-tinted background (#04050b).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#04050bblack
Foreground
#000000black
#f5f5fawhitesmoke
Card
#f4f4fbwhitesmoke
#06060fblack
Card foreground
#000000black
#f8f9fbghostwhite
Popover
#f4f4fbwhitesmoke
#06060fblack
Popover foreground
#000000black
#f8f9fbghostwhite
Primary
#5e64e4slateblue
#5e64e4slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4dd5ekhaki
#e4dd5ekhaki
Secondary foreground
#0d0d02black
#0d0d02black
Muted
#e2e1d5gainsboro
#2a291ddarkslategray
Muted foreground
#4d4d42darkslategray
#bdbdb2silver
Accent
#e4dd5ekhaki
#e4dd5ekhaki
Accent foreground
#0d0d02black
#0d0d02black
Destructive
#b54012firebrick
#df4f16chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5e64e4slateblue
#5e64e4slateblue

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.18:1AAA
Primary button4.74:1AA
Secondary button13.74:1AAA
Muted text6.50:1AA
Accent13.74:1AAA
Destructive5.66:1AA
Dark mode
Text on background18.74:1AAA
Text on card19.14:1AAA
Primary button4.74:1AA
Secondary button13.74:1AAA
Muted text7.69:1AAA
Accent13.74:1AAA
Destructive3.99:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.006 283.864);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.907 0.016 104.277);
  --muted-foreground: oklch(0.416 0.018 104.667);
  --popover: oklch(0.969 0.009 283.808);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.969 0.009 283.808);
  --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.569 0.19 276.27);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.879 0.148 106.244);
  --secondary-foreground: oklch(0.153 0.025 106.911);
  --accent: oklch(0.879 0.148 106.244);
  --accent-foreground: oklch(0.153 0.025 106.911);
  --destructive: oklch(0.531 0.161 38.842);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.569 0.19 276.27);
  --chart-1: oklch(0.569 0.19 276.27);
  --chart-2: oklch(0.879 0.148 106.244);
  --chart-3: oklch(0.879 0.148 106.244);
  --chart-4: oklch(0.888 0.139 106.151);
  --chart-5: oklch(0.565 0.197 275.799);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.017 280.302);
  --foreground: oklch(0.972 0.006 283.871);
  --muted: oklch(0.28 0.021 105.181);
  --muted-foreground: oklch(0.795 0.015 104.291);
  --popover: oklch(0.128 0.02 280.297);
  --popover-foreground: oklch(0.982 0.004 283.906);
  --card: oklch(0.128 0.02 280.297);
  --card-foreground: oklch(0.982 0.004 283.906);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.569 0.19 276.27);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.879 0.148 106.244);
  --secondary-foreground: oklch(0.153 0.025 106.911);
  --accent: oklch(0.879 0.148 106.244);
  --accent-foreground: oklch(0.153 0.025 106.911);
  --destructive: oklch(0.618 0.19 38.587);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.569 0.19 276.27);
  --chart-1: oklch(0.569 0.19 276.27);
  --chart-2: oklch(0.879 0.148 106.244);
  --chart-3: oklch(0.879 0.148 106.244);
  --chart-4: oklch(0.888 0.139 106.151);
  --chart-5: oklch(0.565 0.197 275.799);
}