Initialize for shadcn/ui

Initialize is a shadcn/ui theme built around a vivid deep green primary color (#3e8f04) with vivid deep pink accents (#8f043e). The light mode uses a neutral background (#fcfdfb). Dark mode keeps the vivid deep green primary (#3e8f04) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfdfbsnow
#000000black
Foreground
#0b1603black
#fafcf8snow
Card
#fcfdfbsnow
#000000black
Card foreground
#0b1603black
#fafcf8snow
Popover
#fcfdfbsnow
#000000black
Popover foreground
#0b1603black
#fafcf8snow
Primary
#3e8f04forestgreen
#3e8f04forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#043e8fmidnightblue
#043e8fmidnightblue
Secondary foreground
#c9dffdlavender
#c9dffdlavender
Muted
#dce2eagainsboro
#151b23black
Muted foreground
#4d4f51darkslategray
#aeb0b2darkgray
Accent
#8f043ebrown
#8f043ebrown
Accent foreground
#fdc9dfpink
#fdc9dfpink
Destructive
#7f1a05maroon
#f65231tomato
Destructive foreground
#fcc5balightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e8f04forestgreen
#3e8f04forestgreen

Contrast

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

Light mode
Text on background18.27:1AAA
Text on card18.27:1AAA
Primary button4.06:1AA Large
Secondary button7.35:1AAA
Muted text6.30:1AA
Accent6.44:1AA
Destructive6.73:1AA
Dark mode
Text on background20.34:1AAA
Text on card20.34:1AAA
Primary button4.06:1AA Large
Secondary button7.35:1AAA
Muted text7.95:1AAA
Accent6.44:1AA
Destructive6.19:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 131.749);
  --foreground: oklch(0.185 0.042 132.547);
  --muted: oklch(0.91 0.012 256.703);
  --muted-foreground: oklch(0.426 0.003 256.684);
  --popover: oklch(0.994 0.003 131.749);
  --popover-foreground: oklch(0.185 0.042 132.547);
  --card: oklch(0.994 0.003 131.749);
  --card-foreground: oklch(0.185 0.042 132.547);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.578 0.174 137.299);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.386 0.145 259.136);
  --secondary-foreground: oklch(0.896 0.049 256.795);
  --accent: oklch(0.42 0.166 6.43);
  --accent-foreground: oklch(0.887 0.066 351.654);
  --destructive: oklch(0.391 0.139 32.77);
  --destructive-foreground: oklch(0.87 0.065 31.378);
  --ring: oklch(0.578 0.174 137.299);
  --chart-1: oklch(0.578 0.174 137.299);
  --chart-2: oklch(0.386 0.145 259.136);
  --chart-3: oklch(0.42 0.166 6.43);
  --chart-4: oklch(0.413 0.157 259.285);
  --chart-5: oklch(0.583 0.178 137.462);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.988 0.006 131.772);
  --muted: oklch(0.22 0.018 256.825);
  --muted-foreground: oklch(0.756 0.003 256.668);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.988 0.006 131.772);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.988 0.006 131.772);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.578 0.174 137.299);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.386 0.145 259.136);
  --secondary-foreground: oklch(0.896 0.049 256.795);
  --accent: oklch(0.42 0.166 6.43);
  --accent-foreground: oklch(0.887 0.066 351.654);
  --destructive: oklch(0.661 0.206 33.195);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.578 0.174 137.299);
  --chart-1: oklch(0.578 0.174 137.299);
  --chart-2: oklch(0.386 0.145 259.136);
  --chart-3: oklch(0.42 0.166 6.43);
  --chart-4: oklch(0.413 0.157 259.285);
  --chart-5: oklch(0.583 0.178 137.462);
}