Analyst for shadcn/ui

Analyst is a shadcn/ui theme built around a green primary color (#2e7f3d) with muted light green accents (#cbd7cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#2e7f3d) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#031106black
#f5f9f6whitesmoke
Card
#ffffffwhite
#010402black
Card foreground
#031106black
#f5f9f6whitesmoke
Popover
#ffffffwhite
#010402black
Popover foreground
#031106black
#f5f9f6whitesmoke
Primary
#2e7f3dseagreen
#2e7f3dseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4e7e4gainsboro
#253227darkslategray
Secondary foreground
#475249darkslategray
#bccdbfsilver
Muted
#dce0dcgainsboro
#1f2320black
Muted foreground
#575757dimgray
#a8a8a8darkgray
Accent
#cbd7cdlightgrey
#2f4b34darkslategray
Accent foreground
#313f33darkslategray
#cde0d0lightgrey
Destructive
#b03703firebrick
#f14b04orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e7f3dseagreen
#2e7f3dseagreen

Contrast

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

Light mode
Text on background19.32:1AAA
Text on card19.32:1AAA
Primary button4.95:1AA
Secondary button6.56:1AA
Muted text5.41:1AA
Accent7.49:1AAA
Destructive6.20:1AA
Dark mode
Text on background19.40:1AAA
Text on card19.40:1AAA
Primary button4.95:1AA
Secondary button8.08:1AAA
Muted text6.66:1AA
Accent6.94:1AA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.16 0.033 149.542);
  --muted: oklch(0.903 0.007 151.294);
  --muted-foreground: oklch(0.456 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.16 0.033 149.542);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.16 0.033 149.542);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.532 0.128 146.957);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.925 0.005 151.323);
  --secondary-foreground: oklch(0.426 0.02 150.723);
  --accent: oklch(0.868 0.018 151.099);
  --accent-foreground: oklch(0.352 0.028 150.203);
  --destructive: oklch(0.51 0.165 38.054);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.532 0.128 146.957);
  --chart-1: oklch(0.532 0.128 146.957);
  --chart-2: oklch(0.925 0.005 151.323);
  --chart-3: oklch(0.868 0.018 151.099);
  --chart-4: oklch(0.948 0.004 151.35);
  --chart-5: oklch(0.538 0.134 146.713);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.013 150.676);
  --foreground: oklch(0.979 0.006 151.316);
  --muted: oklch(0.252 0.01 150.839);
  --muted-foreground: oklch(0.733 0 180);
  --popover: oklch(0.096 0.013 150.676);
  --popover-foreground: oklch(0.979 0.006 151.316);
  --card: oklch(0.096 0.013 150.676);
  --card-foreground: oklch(0.979 0.006 151.316);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.532 0.128 146.957);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.301 0.026 150.095);
  --secondary-foreground: oklch(0.831 0.027 150.924);
  --accent: oklch(0.384 0.052 149.25);
  --accent-foreground: oklch(0.887 0.029 150.932);
  --destructive: oklch(0.643 0.212 37.358);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.532 0.128 146.957);
  --chart-1: oklch(0.532 0.128 146.957);
  --chart-2: oklch(0.301 0.026 150.095);
  --chart-3: oklch(0.384 0.052 149.25);
  --chart-4: oklch(0.333 0.03 150.045);
  --chart-5: oklch(0.538 0.134 146.713);
}