Key for shadcn/ui

Key is a shadcn/ui theme built around a light green primary color (#bedab9) with muted light green accents (#d3dad2). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#bedab9) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#ffffffwhite
#020402black
Foreground
#020401black
#f7f8f6whitesmoke
Card
#fcfcfcsnow
#040703black
Card foreground
#000000black
#f9fbf9mintcream
Popover
#ffffffwhite
#020402black
Popover foreground
#020401black
#f7f8f6whitesmoke
Primary
#bedab9silver
#bedab9silver
Primary foreground
#263f21darkslategray
#263f21darkslategray
Secondary
#d3dad2lightgrey
#151b13black
Secondary foreground
#394337darkslategray
#a8bda3darkgray
Muted
#dfefdcgainsboro
#132310black
Muted foreground
#3c453bdarkslategray
#bcc4basilver
Accent
#d3dad2lightgrey
#151b13black
Accent foreground
#394337darkslategray
#a8bda3darkgray
Destructive
#66130amaroon
#eb4533tomato
Destructive foreground
#f7b3ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bedab9silver
#bedab9silver

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.54:1AAA
Primary button7.67:1AAA
Secondary button7.27:1AAA
Muted text8.31:1AAA
Accent7.27:1AAA
Destructive7.19:1AAA
Dark mode
Text on background19.35:1AAA
Text on card19.47:1AAA
Primary button7.67:1AAA
Secondary button8.77:1AAA
Muted text9.20:1AAA
Accent8.77:1AAA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.016 138.922);
  --muted: oklch(0.935 0.03 140.482);
  --muted-foreground: oklch(0.379 0.02 140.45);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.016 138.922);
  --card: oklch(0.992 0 161.565);
  --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.859 0.054 140.437);
  --primary-foreground: oklch(0.34 0.059 140.339);
  --secondary: oklch(0.882 0.013 140.508);
  --secondary-foreground: oklch(0.371 0.025 140.432);
  --accent: oklch(0.882 0.013 140.508);
  --accent-foreground: oklch(0.371 0.025 140.432);
  --destructive: oklch(0.335 0.117 30.399);
  --destructive-foreground: oklch(0.828 0.08 26.073);
  --ring: oklch(0.859 0.054 140.437);
  --chart-1: oklch(0.859 0.054 140.437);
  --chart-2: oklch(0.882 0.013 140.508);
  --chart-3: oklch(0.882 0.013 140.508);
  --chart-4: oklch(0.904 0.011 140.513);
  --chart-5: oklch(0.861 0.059 140.428);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.013 139.29);
  --foreground: oklch(0.978 0.003 140.527);
  --muted: oklch(0.236 0.041 140.339);
  --muted-foreground: oklch(0.812 0.017 140.499);
  --popover: oklch(0.096 0.013 139.29);
  --popover-foreground: oklch(0.978 0.003 140.527);
  --card: oklch(0.121 0.016 139.29);
  --card-foreground: oklch(0.986 0.002 140.528);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.859 0.054 140.437);
  --primary-foreground: oklch(0.34 0.059 140.339);
  --secondary: oklch(0.211 0.017 140.413);
  --secondary-foreground: oklch(0.774 0.042 140.448);
  --accent: oklch(0.211 0.017 140.413);
  --accent-foreground: oklch(0.774 0.042 140.448);
  --destructive: oklch(0.629 0.205 30.085);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.859 0.054 140.437);
  --chart-1: oklch(0.859 0.054 140.437);
  --chart-2: oklch(0.211 0.017 140.413);
  --chart-3: oklch(0.211 0.017 140.413);
  --chart-4: oklch(0.247 0.022 140.403);
  --chart-5: oklch(0.861 0.059 140.428);
}