Sane for shadcn/ui

Sane is a shadcn/ui theme built around a green primary color (#c6e35f) with green accents (#84e35f). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#c6e35f) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#ffffffwhite
#030401black
Foreground
#070803black
#ffffffwhite
Card
#fcfcfcsnow
#070802black
Card foreground
#030401black
#ffffffwhite
Popover
#fcfcfcsnow
#070802black
Popover foreground
#030401black
#ffffffwhite
Primary
#c6e35fdarkkhaki
#c6e35fdarkkhaki
Primary foreground
#0b0d02black
#0b0d02black
Secondary
#e3bd5fsandybrown
#e3bd5fsandybrown
Secondary foreground
#0d0a02black
#0d0a02black
Muted
#efeeeblinen
#141310black
Muted foreground
#6b6452dimgray
#ada694darkgray
Accent
#84e35flightgreen
#84e35flightgreen
Accent foreground
#050d02black
#050d02black
Destructive
#b73806firebrick
#f96f39tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c6e35fdarkkhaki
#c6e35fdarkkhaki

Contrast

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

Light mode
Text on background20.09:1AAA
Text on card20.11:1AAA
Primary button13.53:1AAA
Secondary button11.04:1AAA
Muted text5.07:1AA
Accent12.30:1AAA
Destructive5.86:1AA
Dark mode
Text on background20.55:1AAA
Text on card20.13:1AAA
Primary button13.53:1AAA
Secondary button11.04:1AAA
Muted text7.67:1AAA
Accent12.30:1AAA
Destructive7.37:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.128 0.016 116.724);
  --muted: oklch(0.949 0.004 88.82);
  --muted-foreground: oklch(0.503 0.028 89.014);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.102 0.013 116.724);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.102 0.013 116.724);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.868 0.161 120.143);
  --primary-foreground: oklch(0.152 0.026 117.491);
  --secondary: oklch(0.813 0.121 87.935);
  --secondary-foreground: oklch(0.145 0.021 94.181);
  --accent: oklch(0.828 0.191 137.817);
  --accent-foreground: oklch(0.146 0.031 134.771);
  --destructive: oklch(0.524 0.171 37.329);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.868 0.161 120.143);
  --chart-1: oklch(0.868 0.161 120.143);
  --chart-2: oklch(0.813 0.121 87.935);
  --chart-3: oklch(0.828 0.191 137.817);
  --chart-4: oklch(0.828 0.113 88.285);
  --chart-5: oklch(0.875 0.166 120.277);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.013 116.731);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.186 0.006 88.969);
  --muted-foreground: oklch(0.726 0.026 88.974);
  --popover: oklch(0.128 0.017 116.731);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.128 0.017 116.731);
  --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.868 0.161 120.143);
  --primary-foreground: oklch(0.152 0.026 117.491);
  --secondary: oklch(0.813 0.121 87.935);
  --secondary-foreground: oklch(0.145 0.021 94.181);
  --accent: oklch(0.828 0.191 137.817);
  --accent-foreground: oklch(0.146 0.031 134.771);
  --destructive: oklch(0.702 0.182 40.651);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.868 0.161 120.143);
  --chart-1: oklch(0.868 0.161 120.143);
  --chart-2: oklch(0.813 0.121 87.935);
  --chart-3: oklch(0.828 0.191 137.817);
  --chart-4: oklch(0.828 0.113 88.285);
  --chart-5: oklch(0.875 0.166 120.277);
}