green color scheme for shadcn/ui

green color scheme is a shadcn/ui theme built around a green primary color (#6ebd3d) with violet accents (#8c3dbd). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the green primary (#6ebd3d) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#070a05black
Foreground
#0a1703black
#ffffffwhite
Card
#f6fcf2honeydew
#090e07black
Card foreground
#081202black
#ffffffwhite
Popover
#f9fdf7mintcream
#070a05black
Popover foreground
#0a1703black
#ffffffwhite
Primary
#6ebd3dyellowgreen
#6ebd3dyellowgreen
Primary foreground
#14230bblack
#14230bblack
Secondary
#8c3dbddarkorchid
#8c3dbddarkorchid
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e3d6eagainsboro
#211529black
Muted foreground
#575459dimgray
#a9a6abdarkgray
Accent
#8c3dbddarkorchid
#8c3dbddarkorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d01c16firebrick
#d91d17crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#eaeee8linen
#252c21darkslategray
Input
#eaeee8linen
#252c21darkslategray
Ring
#6ebd3dyellowgreen
#6ebd3dyellowgreen

Contrast

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

Light mode
Text on background17.99:1AAA
Text on card18.38:1AAA
Primary button7.04:1AAA
Secondary button5.97:1AA
Muted text5.35:1AA
Accent5.97:1AA
Destructive5.45:1AA
Dark mode
Text on background19.88:1AAA
Text on card19.51:1AAA
Primary button7.04:1AAA
Secondary button5.97:1AA
Muted text7.27:1AAA
Accent5.97:1AA
Destructive5.07:1AA

CSS variables

Paste this into your globals.css to use green color scheme in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.01 133.054);
  --foreground: oklch(0.185 0.043 133.475);
  --muted: oklch(0.893 0.03 312.755);
  --muted-foreground: oklch(0.451 0.009 312.845);
  --popover: oklch(0.99 0.01 133.054);
  --popover-foreground: oklch(0.185 0.043 133.475);
  --card: oklch(0.985 0.015 133.089);
  --card-foreground: oklch(0.167 0.038 132.392);
  --border: oklch(0.944 0.009 133.052);
  --input: oklch(0.944 0.009 133.052);
  --primary: oklch(0.721 0.179 135.704);
  --primary-foreground: oklch(0.235 0.046 134.767);
  --secondary: oklch(0.525 0.195 309.553);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.525 0.195 309.553);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.548 0.211 28.872);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.721 0.179 135.704);
  --chart-1: oklch(0.721 0.179 135.704);
  --chart-2: oklch(0.525 0.195 309.553);
  --chart-3: oklch(0.525 0.195 309.553);
  --chart-4: oklch(0.549 0.192 309.903);
  --chart-5: oklch(0.729 0.186 135.892);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.014 132.054);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.22 0.042 311.622);
  --muted-foreground: oklch(0.728 0.008 312.908);
  --popover: oklch(0.14 0.014 132.054);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.155 0.017 132.758);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.282 0.023 133.573);
  --input: oklch(0.282 0.023 133.573);
  --primary: oklch(0.721 0.179 135.704);
  --primary-foreground: oklch(0.235 0.046 134.767);
  --secondary: oklch(0.525 0.195 309.553);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.525 0.195 309.553);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.566 0.218 28.893);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.721 0.179 135.704);
  --chart-1: oklch(0.721 0.179 135.704);
  --chart-2: oklch(0.525 0.195 309.553);
  --chart-3: oklch(0.525 0.195 309.553);
  --chart-4: oklch(0.549 0.192 309.903);
  --chart-5: oklch(0.729 0.186 135.892);
}