Alto for shadcn/ui

Alto is a shadcn/ui theme built around a deep green primary color (#226d37) with muted light green accents (#cbd2cd). The light mode uses a neutral background (#fbfefc). Dark mode keeps the deep green primary (#226d37) on a green-tinted background (#050b06).

Color palette

TokenLightDark
Background
#fbfefcwhite
#050b06black
Foreground
#031107black
#ffffffwhite
Card
#f7fcf9mintcream
#060e08black
Card foreground
#020d05black
#ffffffwhite
Popover
#fbfefcwhite
#050b06black
Popover foreground
#031107black
#ffffffwhite
Primary
#226d37forestgreen
#226d37forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cbd2cdlightgrey
#1e2420black
Secondary foreground
#313a34darkslategray
#b5c0b8silver
Muted
#d9dedagainsboro
#212623black
Muted foreground
#3b453edarkslategray
#bac4bdsilver
Accent
#cbd2cdlightgrey
#1e2420black
Accent foreground
#313a34darkslategray
#b5c0b8silver
Destructive
#cc5514chocolate
#e96620chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#226d37forestgreen
#226d37forestgreen

Contrast

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

Light mode
Text on background18.99:1AAA
Text on card19.11:1AAA
Primary button6.37:1AA
Secondary button7.65:1AAA
Muted text7.30:1AAA
Accent7.65:1AAA
Destructive4.31:1AA Large
Dark mode
Text on background19.90:1AAA
Text on card19.52:1AAA
Primary button6.37:1AA
Secondary button8.43:1AAA
Muted text8.56:1AAA
Accent8.43:1AAA
Destructive6.40:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 155.127);
  --foreground: oklch(0.161 0.031 153.256);
  --muted: oklch(0.895 0.007 155.043);
  --muted-foreground: oklch(0.378 0.018 154.279);
  --popover: oklch(0.994 0.003 155.127);
  --popover-foreground: oklch(0.161 0.031 153.256);
  --card: oklch(0.987 0.007 155.062);
  --card-foreground: oklch(0.143 0.027 154.246);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.474 0.111 149.347);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.858 0.011 154.947);
  --secondary-foreground: oklch(0.338 0.016 154.309);
  --accent: oklch(0.858 0.011 154.947);
  --accent-foreground: oklch(0.338 0.016 154.309);
  --destructive: oklch(0.595 0.167 43.321);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.474 0.111 149.347);
  --chart-1: oklch(0.474 0.111 149.347);
  --chart-2: oklch(0.858 0.011 154.947);
  --chart-3: oklch(0.858 0.011 154.947);
  --chart-4: oklch(0.88 0.009 154.993);
  --chart-5: oklch(0.479 0.116 149.047);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.015 154.797);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.263 0.01 154.493);
  --muted-foreground: oklch(0.811 0.015 154.846);
  --popover: oklch(0.138 0.015 154.797);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.154 0.018 154.071);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.474 0.111 149.347);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.253 0.01 154.409);
  --secondary-foreground: oklch(0.796 0.016 154.809);
  --accent: oklch(0.253 0.01 154.409);
  --accent-foreground: oklch(0.796 0.016 154.809);
  --destructive: oklch(0.664 0.179 44.173);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.474 0.111 149.347);
  --chart-1: oklch(0.474 0.111 149.347);
  --chart-2: oklch(0.253 0.01 154.409);
  --chart-3: oklch(0.253 0.01 154.409);
  --chart-4: oklch(0.285 0.012 154.363);
  --chart-5: oklch(0.479 0.116 149.047);
}