Key for shadcn/ui

Key is a shadcn/ui theme built around a vivid green primary color (#9cf28d) with vivid green accents (#8df2b0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#9cf28d) on a green-tinted background (#050b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#050b04black
Foreground
#030901black
#fcfdfcwhite
Card
#fcfcfcsnow
#070f05black
Card foreground
#010401black
#ffffffwhite
Popover
#fcfcfcsnow
#070f05black
Popover foreground
#010401black
#ffffffwhite
Primary
#9cf28dlightgreen
#9cf28dlightgreen
Primary foreground
#114408darkgreen
#114408darkgreen
Secondary
#cef28dkhaki
#cef28dkhaki
Secondary foreground
#2f4408darkgreen
#2f4408darkgreen
Muted
#dce3cegainsboro
#29311cdarkslategray
Muted foreground
#525a44darkolivegreen
#b3bba5darkgray
Accent
#8df2b0palegreen
#8df2b0palegreen
Accent foreground
#08441ddarkgreen
#08441ddarkgreen
Destructive
#8a2000darkred
#ff3f05orangered
Destructive foreground
#ffccbdpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9cf28dlightgreen
#9cf28dlightgreen

Contrast

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

Light mode
Text on background20.12:1AAA
Text on card20.16:1AAA
Primary button8.33:1AAA
Secondary button8.54:1AAA
Muted text5.49:1AA
Accent8.30:1AAA
Destructive6.40:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.42:1AAA
Primary button8.33:1AAA
Secondary button8.54:1AAA
Muted text6.81:1AA
Accent8.30:1AAA
Destructive3.51: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.125 0.028 138.869);
  --muted: oklch(0.906 0.03 122.732);
  --muted-foreground: oklch(0.455 0.036 123.494);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.099 0.022 138.869);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.099 0.022 138.869);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.882 0.158 140.74);
  --primary-foreground: oklch(0.341 0.103 141.063);
  --secondary: oklch(0.912 0.133 124.728);
  --secondary-foreground: oklch(0.358 0.087 127.772);
  --accent: oklch(0.881 0.132 154.234);
  --accent-foreground: oklch(0.342 0.089 149.651);
  --destructive: oklch(0.417 0.146 35.186);
  --destructive-foreground: oklch(0.886 0.062 37.592);
  --ring: oklch(0.882 0.158 140.74);
  --chart-1: oklch(0.882 0.158 140.74);
  --chart-2: oklch(0.912 0.133 124.728);
  --chart-3: oklch(0.881 0.132 154.234);
  --chart-4: oklch(0.922 0.118 124.374);
  --chart-5: oklch(0.885 0.163 140.736);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.023 139.549);
  --foreground: oklch(0.993 0.001 141.063);
  --muted: oklch(0.299 0.038 124.342);
  --muted-foreground: oklch(0.78 0.032 122.86);
  --popover: oklch(0.157 0.027 139.817);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.157 0.027 139.817);
  --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.882 0.158 140.74);
  --primary-foreground: oklch(0.341 0.103 141.063);
  --secondary: oklch(0.912 0.133 124.728);
  --secondary-foreground: oklch(0.358 0.087 127.772);
  --accent: oklch(0.881 0.132 154.234);
  --accent-foreground: oklch(0.342 0.089 149.651);
  --destructive: oklch(0.656 0.233 34.148);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.882 0.158 140.74);
  --chart-1: oklch(0.882 0.158 140.74);
  --chart-2: oklch(0.912 0.133 124.728);
  --chart-3: oklch(0.881 0.132 154.234);
  --chart-4: oklch(0.922 0.118 124.374);
  --chart-5: oklch(0.885 0.163 140.736);
}