2 for shadcn/ui

2 is a shadcn/ui theme built around a neutral gray primary color (#363a38) with muted light green accents (#dde4e0). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#363a38) on a green-tinted background (#030c07).

Color palette

TokenLightDark
Background
#ffffffwhite
#030c07black
Foreground
#010905black
#f8fcfamintcream
Card
#ffffffwhite
#030c07black
Card foreground
#010905black
#f8fcfamintcream
Popover
#ffffffwhite
#030c07black
Popover foreground
#010905black
#f8fcfamintcream
Primary
#363a38darkslategray
#363a38darkslategray
Primary foreground
#cfd3d1lightgrey
#cfd3d1lightgrey
Secondary
#dde4e0gainsboro
#25312bdarkslategray
Secondary foreground
#3f5047darkslategray
#bccdc4silver
Muted
#e1efe7lavender
#101e16black
Muted foreground
#4b5d53darkslategray
#a2b4aadarkgray
Accent
#dde4e0gainsboro
#25312bdarkslategray
Accent foreground
#3f5047darkslategray
#bccdc4silver
Destructive
#9c1202darkred
#f61c04red
Destructive foreground
#fed6d2bisque
#ffffffwhite
Border
#e4e7e5gainsboro
#1f2321black
Input
#e4e7e5gainsboro
#1f2321black
Ring
#363a38darkslategray
#363a38darkslategray

Contrast

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

Light mode
Text on background20.14:1AAA
Text on card20.14:1AAA
Primary button7.61:1AAA
Secondary button6.63:1AA
Muted text5.92:1AA
Accent6.63:1AA
Destructive6.32:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button7.61:1AAA
Secondary button8.11:1AAA
Muted text7.91:1AAA
Accent8.11:1AAA
Destructive4.12:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.126 0.023 162.655);
  --muted: oklch(0.94 0.018 162.145);
  --muted-foreground: oklch(0.461 0.028 161.02);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.126 0.023 162.655);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.126 0.023 162.655);
  --border: oklch(0.926 0.005 162.494);
  --input: oklch(0.926 0.005 162.494);
  --primary: oklch(0.345 0.007 162.077);
  --primary-foreground: oklch(0.863 0.005 162.479);
  --secondary: oklch(0.912 0.01 162.358);
  --secondary-foreground: oklch(0.413 0.027 160.918);
  --accent: oklch(0.912 0.01 162.358);
  --accent-foreground: oklch(0.413 0.027 160.918);
  --destructive: oklch(0.442 0.172 30.649);
  --destructive-foreground: oklch(0.909 0.045 25.476);
  --ring: oklch(0.345 0.007 162.077);
  --chart-1: oklch(0.345 0.007 162.077);
  --chart-2: oklch(0.912 0.01 162.358);
  --chart-3: oklch(0.912 0.01 162.358);
  --chart-4: oklch(0.934 0.007 162.429);
  --chart-5: oklch(0.347 0.013 161.67);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.02 162.346);
  --foreground: oklch(0.987 0.004 162.511);
  --muted: oklch(0.219 0.024 159.458);
  --muted-foreground: oklch(0.753 0.025 161.771);
  --popover: oklch(0.142 0.02 162.346);
  --popover-foreground: oklch(0.987 0.004 162.511);
  --card: oklch(0.142 0.02 162.346);
  --card-foreground: oklch(0.987 0.004 162.511);
  --border: oklch(0.252 0.008 161.786);
  --input: oklch(0.252 0.008 161.786);
  --primary: oklch(0.345 0.007 162.077);
  --primary-foreground: oklch(0.863 0.005 162.479);
  --secondary: oklch(0.301 0.02 160.825);
  --secondary-foreground: oklch(0.832 0.022 161.958);
  --accent: oklch(0.301 0.02 160.825);
  --accent-foreground: oklch(0.832 0.022 161.958);
  --destructive: oklch(0.618 0.244 30.279);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.345 0.007 162.077);
  --chart-1: oklch(0.345 0.007 162.077);
  --chart-2: oklch(0.301 0.02 160.825);
  --chart-3: oklch(0.301 0.02 160.825);
  --chart-4: oklch(0.333 0.023 160.756);
  --chart-5: oklch(0.347 0.013 161.67);
}