Gun for shadcn/ui

Gun is a shadcn/ui theme built around a light green primary color (#d3f8d5) with light red accents (#f8d5d3). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#d3f8d5) on a green-tinted background (#040b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#040b04black
Foreground
#031104black
#f9fbf9mintcream
Card
#fcfcfcsnow
#050f06black
Card foreground
#030d03black
#fcfdfcwhite
Popover
#ffffffwhite
#040b04black
Popover foreground
#031104black
#f9fbf9mintcream
Primary
#d3f8d5gainsboro
#d3f8d5gainsboro
Primary foreground
#072c09black
#072c09black
Secondary
#d5d3f8lavender
#d5d3f8lavender
Secondary foreground
#2e21demediumblue
#2e21demediumblue
Muted
#dddceagainsboro
#161523black
Muted foreground
#424148darkslategray
#b7b7besilver
Accent
#f8d5d3mistyrose
#f8d5d3mistyrose
Accent foreground
#851b14maroon
#851b14maroon
Destructive
#860f09darkred
#f02419crimson
Destructive foreground
#fbc8c5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d3f8d5gainsboro
#d3f8d5gainsboro

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card19.33:1AAA
Primary button13.24:1AAA
Secondary button6.06:1AA
Muted text7.45:1AAA
Accent7.15:1AAA
Destructive6.78:1AA
Dark mode
Text on background19.11:1AAA
Text on card19.09:1AAA
Primary button13.24:1AAA
Secondary button6.06:1AA
Muted text9.01:1AAA
Accent7.15:1AAA
Destructive4.21:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.159 0.036 145.611);
  --muted: oklch(0.9 0.018 289.095);
  --muted-foreground: oklch(0.38 0.012 288.898);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.159 0.036 145.611);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.142 0.031 145.838);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.944 0.061 146.881);
  --primary-foreground: oklch(0.259 0.073 144.137);
  --secondary: oklch(0.88 0.052 288.342);
  --secondary-foreground: oklch(0.439 0.261 270.867);
  --accent: oklch(0.902 0.04 22.756);
  --accent-foreground: oklch(0.405 0.142 29.097);
  --destructive: oklch(0.397 0.153 29.3);
  --destructive-foreground: oklch(0.877 0.059 21.838);
  --ring: oklch(0.944 0.061 146.881);
  --chart-1: oklch(0.944 0.061 146.881);
  --chart-2: oklch(0.88 0.052 288.342);
  --chart-3: oklch(0.902 0.04 22.756);
  --chart-4: oklch(0.916 0.036 288.733);
  --chart-5: oklch(0.945 0.064 146.854);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.022 146.338);
  --foreground: oklch(0.985 0.002 147.523);
  --muted: oklch(0.205 0.027 286.856);
  --muted-foreground: oklch(0.781 0.01 289.246);
  --popover: oklch(0.139 0.022 146.338);
  --popover-foreground: oklch(0.985 0.002 147.523);
  --card: oklch(0.155 0.026 146.144);
  --card-foreground: oklch(0.993 0.001 147.534);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.944 0.061 146.881);
  --primary-foreground: oklch(0.259 0.073 144.137);
  --secondary: oklch(0.88 0.052 288.342);
  --secondary-foreground: oklch(0.439 0.261 270.867);
  --accent: oklch(0.902 0.04 22.756);
  --accent-foreground: oklch(0.405 0.142 29.097);
  --destructive: oklch(0.612 0.235 29.283);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.944 0.061 146.881);
  --chart-1: oklch(0.944 0.061 146.881);
  --chart-2: oklch(0.88 0.052 288.342);
  --chart-3: oklch(0.902 0.04 22.756);
  --chart-4: oklch(0.916 0.036 288.733);
  --chart-5: oklch(0.945 0.064 146.854);
}