Stack for shadcn/ui

Stack is a shadcn/ui theme built around a green primary color (#90eea1) with red accents (#eea190). The light mode uses a neutral background (#fbfefc). Dark mode keeps the green primary (#90eea1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefcwhite
#000000black
Foreground
#030c05black
#ffffffwhite
Card
#fbfefcwhite
#000000black
Card foreground
#030c05black
#ffffffwhite
Popover
#fbfefcwhite
#000000black
Popover foreground
#030c05black
#ffffffwhite
Primary
#90eea1lightgreen
#90eea1lightgreen
Primary foreground
#0a4314darkgreen
#0a4314darkgreen
Secondary
#a190eemediumpurple
#a190eemediumpurple
Secondary foreground
#140a43midnightblue
#140a43midnightblue
Muted
#e6e3f2lavender
#0f0d1cblack
Muted foreground
#504f54darkslategray
#acabb0darkgray
Accent
#eea190darksalmon
#eea190darksalmon
Accent foreground
#43140amaroon
#43140amaroon
Destructive
#c73f00firebrick
#f54e00orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#90eea1lightgreen
#90eea1lightgreen

Contrast

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

Light mode
Text on background19.51:1AAA
Text on card19.51:1AAA
Primary button8.20:1AAA
Secondary button6.72:1AA
Muted text6.41:1AA
Accent7.57:1AAA
Destructive5.07:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.20:1AAA
Secondary button6.72:1AA
Muted text8.41:1AAA
Accent7.57:1AAA
Destructive3.52:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 151.346);
  --foreground: oklch(0.141 0.025 150.296);
  --muted: oklch(0.922 0.021 294.398);
  --muted-foreground: oklch(0.431 0.008 294.476);
  --popover: oklch(0.994 0.004 151.346);
  --popover-foreground: oklch(0.141 0.025 150.296);
  --card: oklch(0.994 0.004 151.346);
  --card-foreground: oklch(0.141 0.025 150.296);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.872 0.139 148.772);
  --primary-foreground: oklch(0.335 0.094 145.743);
  --secondary: oklch(0.707 0.136 290.927);
  --secondary-foreground: oklch(0.208 0.099 281.854);
  --accent: oklch(0.781 0.096 33.191);
  --accent-foreground: oklch(0.266 0.074 34.15);
  --destructive: oklch(0.559 0.181 38.39);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.872 0.139 148.772);
  --chart-1: oklch(0.872 0.139 148.772);
  --chart-2: oklch(0.707 0.136 290.927);
  --chart-3: oklch(0.781 0.096 33.191);
  --chart-4: oklch(0.742 0.119 291.648);
  --chart-5: oklch(0.876 0.145 148.669);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.17 0.032 291.025);
  --muted-foreground: oklch(0.743 0.007 294.649);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.872 0.139 148.772);
  --primary-foreground: oklch(0.335 0.094 145.743);
  --secondary: oklch(0.707 0.136 290.927);
  --secondary-foreground: oklch(0.208 0.099 281.854);
  --accent: oklch(0.781 0.096 33.191);
  --accent-foreground: oklch(0.266 0.074 34.15);
  --destructive: oklch(0.651 0.214 37.893);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.872 0.139 148.772);
  --chart-1: oklch(0.872 0.139 148.772);
  --chart-2: oklch(0.707 0.136 290.927);
  --chart-3: oklch(0.781 0.096 33.191);
  --chart-4: oklch(0.742 0.119 291.648);
  --chart-5: oklch(0.876 0.145 148.669);
}