Century for shadcn/ui

Century is a shadcn/ui theme built around a green primary color (#5d6737) with green accents (#466737). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#5d6737) on a green-tinted background (#090b05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#090b05black
Foreground
#080901black
#fbfbf9snow
Card
#fdfefbwhite
#090b05black
Card foreground
#080901black
#fbfbf9snow
Popover
#fdfefbwhite
#090b05black
Popover foreground
#080901black
#fbfbf9snow
Primary
#5d6737darkolivegreen
#5d6737darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#675937darkolivegreen
#675937darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efece6linen
#191610black
Muted foreground
#605e57dimgray
#a8a59fdarkgray
Accent
#466737darkolivegreen
#466737darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#661705maroon
#f54a24orangered
Destructive foreground
#fbb3a2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5d6737darkolivegreen
#5d6737darkolivegreen

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button6.07:1AA
Secondary button6.90:1AA
Muted text5.52:1AA
Accent6.47:1AA
Destructive7.14:1AAA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button6.07:1AA
Secondary button6.90:1AA
Muted text7.33:1AAA
Accent6.47:1AA
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 115.631);
  --foreground: oklch(0.134 0.026 116.31);
  --muted: oklch(0.945 0.009 87.469);
  --muted-foreground: oklch(0.481 0.011 87.52);
  --popover: oklch(0.995 0.003 115.631);
  --popover-foreground: oklch(0.134 0.026 116.31);
  --card: oklch(0.995 0.003 115.631);
  --card-foreground: oklch(0.134 0.026 116.31);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.493 0.07 118.314);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.052 87.192);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.475 0.082 136.861);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.339 0.116 33.83);
  --destructive-foreground: oklch(0.829 0.088 33.072);
  --ring: oklch(0.493 0.07 118.314);
  --chart-1: oklch(0.493 0.07 118.314);
  --chart-2: oklch(0.468 0.052 87.192);
  --chart-3: oklch(0.475 0.082 136.861);
  --chart-4: oklch(0.499 0.056 87.175);
  --chart-5: oklch(0.5 0.076 118.54);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.144 0.015 116.057);
  --foreground: oklch(0.987 0.003 115.631);
  --muted: oklch(0.202 0.013 87.551);
  --muted-foreground: oklch(0.722 0.01 87.485);
  --popover: oklch(0.144 0.015 116.057);
  --popover-foreground: oklch(0.987 0.003 115.631);
  --card: oklch(0.144 0.015 116.057);
  --card-foreground: oklch(0.987 0.003 115.631);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.493 0.07 118.314);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.052 87.192);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.475 0.082 136.861);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.213 33.791);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.493 0.07 118.314);
  --chart-1: oklch(0.493 0.07 118.314);
  --chart-2: oklch(0.468 0.052 87.192);
  --chart-3: oklch(0.475 0.082 136.861);
  --chart-4: oklch(0.499 0.056 87.175);
  --chart-5: oklch(0.5 0.076 118.54);
}