Secretary for shadcn/ui

Secretary is a shadcn/ui theme built around a purple primary color (#c75cbc) with green accents (#5cc766). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#c75cbc) on a neutral background (#080207).

Color palette

TokenLightDark
Background
#fefbfewhite
#080207black
Foreground
#110310black
#fbf9fbsnow
Card
#fefbfewhite
#080207black
Card foreground
#110310black
#fbf9fbsnow
Popover
#fefbfewhite
#080207black
Popover foreground
#110310black
#fbf9fbsnow
Primary
#c75cbcmediumorchid
#c75cbcmediumorchid
Primary foreground
#000000black
#000000black
Secondary
#5cc766mediumseagreen
#5cc766mediumseagreen
Secondary foreground
#000000black
#000000black
Muted
#eff5f0whitesmoke
#0a100bblack
Muted foreground
#585f59dimgray
#a0a7a0darkgray
Accent
#5cc766mediumseagreen
#5cc766mediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#c44a08chocolate
#f67028tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c75cbcmediumorchid
#c75cbcmediumorchid

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button5.67:1AA
Secondary button9.82:1AAA
Muted text5.94:1AA
Accent9.82:1AAA
Destructive4.85:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button5.67:1AA
Secondary button9.82:1AAA
Muted text7.83:1AAA
Accent9.82:1AAA
Destructive7.25:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 328.65);
  --foreground: oklch(0.136 0.042 331.002);
  --muted: oklch(0.965 0.009 148.49);
  --muted-foreground: oklch(0.479 0.014 148.265);
  --popover: oklch(0.991 0.005 328.65);
  --popover-foreground: oklch(0.136 0.042 331.002);
  --card: oklch(0.991 0.005 328.65);
  --card-foreground: oklch(0.136 0.042 331.002);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.639 0.179 331.398);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.744 0.168 145.579);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.744 0.168 145.579);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.567 0.169 41.693);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.639 0.179 331.398);
  --chart-1: oklch(0.639 0.179 331.398);
  --chart-2: oklch(0.744 0.168 145.579);
  --chart-3: oklch(0.744 0.168 145.579);
  --chart-4: oklch(0.76 0.157 145.879);
  --chart-5: oklch(0.641 0.189 331.537);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.024 329.854);
  --foreground: oklch(0.984 0.004 328.635);
  --muted: oklch(0.163 0.014 147.593);
  --muted-foreground: oklch(0.72 0.013 148.398);
  --popover: oklch(0.108 0.024 329.854);
  --popover-foreground: oklch(0.984 0.004 328.635);
  --card: oklch(0.108 0.024 329.854);
  --card-foreground: oklch(0.984 0.004 328.635);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.639 0.179 331.398);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.744 0.168 145.579);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.744 0.168 145.579);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.697 0.183 44.654);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.639 0.179 331.398);
  --chart-1: oklch(0.639 0.179 331.398);
  --chart-2: oklch(0.744 0.168 145.579);
  --chart-3: oklch(0.744 0.168 145.579);
  --chart-4: oklch(0.76 0.157 145.879);
  --chart-5: oklch(0.641 0.189 331.537);
}