Unity for shadcn/ui

Unity is a shadcn/ui theme built around a vivid green primary color (#8af24a) with vivid violet accents (#b24af2). The light mode uses a neutral background (#fcfefb). Dark mode keeps the vivid green primary (#8af24a) on a green-tinted background (#090f06).

Color palette

TokenLightDark
Background
#fcfefbwhite
#090f06black
Foreground
#000000black
#f7f8f6whitesmoke
Card
#fcfefbwhite
#090f06black
Card foreground
#000000black
#f7f8f6whitesmoke
Popover
#fcfefbwhite
#090f06black
Popover foreground
#000000black
#f7f8f6whitesmoke
Primary
#8af24agreenyellow
#8af24agreenyellow
Primary foreground
#040a01black
#040a01black
Secondary
#b24af2mediumorchid
#b24af2mediumorchid
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eadff1lavender
#190e20black
Muted foreground
#58535adimgray
#a9a5acdarkgray
Accent
#b24af2mediumorchid
#b24af2mediumorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#aa440esaddlebrown
#e75d13chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8af24agreenyellow
#8af24agreenyellow

Contrast

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

Light mode
Text on background20.70:1AAA
Text on card20.70:1AAA
Primary button14.23:1AAA
Secondary button4.07:1AA Large
Muted text5.82:1AA
Accent4.07:1AA Large
Destructive5.91:1AA
Dark mode
Text on background18.22:1AAA
Text on card18.22:1AAA
Primary button14.23:1AAA
Secondary button4.07:1AA Large
Muted text7.70:1AAA
Accent4.07:1AA Large
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 133.016);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.918 0.027 312.782);
  --muted-foreground: oklch(0.45 0.012 312.798);
  --popover: oklch(0.995 0.004 133.016);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.995 0.004 133.016);
  --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.867 0.223 135.922);
  --primary-foreground: oklch(0.13 0.031 130.771);
  --secondary: oklch(0.622 0.244 309.2);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.622 0.244 309.2);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.518 0.146 43.153);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.867 0.223 135.922);
  --chart-1: oklch(0.867 0.223 135.922);
  --chart-2: oklch(0.622 0.244 309.2);
  --chart-3: oklch(0.622 0.244 309.2);
  --chart-4: oklch(0.646 0.229 309.839);
  --chart-5: oklch(0.874 0.228 136.041);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.022 132.651);
  --foreground: oklch(0.979 0.003 133.004);
  --muted: oklch(0.188 0.039 311.464);
  --muted-foreground: oklch(0.727 0.011 312.882);
  --popover: oklch(0.158 0.022 132.651);
  --popover-foreground: oklch(0.979 0.003 133.004);
  --card: oklch(0.158 0.022 132.651);
  --card-foreground: oklch(0.979 0.003 133.004);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.867 0.223 135.922);
  --primary-foreground: oklch(0.13 0.031 130.771);
  --secondary: oklch(0.622 0.244 309.2);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.622 0.244 309.2);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.648 0.187 42.61);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.867 0.223 135.922);
  --chart-1: oklch(0.867 0.223 135.922);
  --chart-2: oklch(0.622 0.244 309.2);
  --chart-3: oklch(0.622 0.244 309.2);
  --chart-4: oklch(0.646 0.229 309.839);
  --chart-5: oklch(0.874 0.228 136.041);
}