Sharp for shadcn/ui

Sharp is a shadcn/ui theme built around a green primary color (#3aa81f) with muted light green accents (#c4d2c1). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the green primary (#3aa81f) on a green-tinted background (#050c04).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#050c04black
Foreground
#020401black
#fcfdfcwhite
Card
#f8fdf7mintcream
#050c04black
Card foreground
#020401black
#fcfdfcwhite
Popover
#f8fdf7mintcream
#050c04black
Popover foreground
#020401black
#fcfdfcwhite
Primary
#3aa81fforestgreen
#3aa81fforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dce0dcgainsboro
#2d2f2ddarkslategray
Secondary foreground
#424a40darkslategray
#c6c9c5silver
Muted
#dde7dagainsboro
#1b2518black
Muted foreground
#596756dimgray
#9ca998darkgray
Accent
#c4d2c1silver
#404c3ddarkslategray
Accent foreground
#2c3829darkslategray
#dce1dagainsboro
Destructive
#5e1808maroon
#ed5331tomato
Destructive foreground
#f7b1a1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3aa81fforestgreen
#3aa81fforestgreen

Contrast

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

Light mode
Text on background19.99:1AAA
Text on card19.99:1AAA
Primary button3.08:1AA Large
Secondary button6.89:1AA
Muted text4.70:1AA
Accent7.82:1AAA
Destructive7.31:1AAA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button3.08:1AA Large
Secondary button8.05:1AAA
Muted text6.46:1AA
Accent6.78:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.01 139.441);
  --foreground: oklch(0.099 0.02 137.51);
  --muted: oklch(0.916 0.019 139.439);
  --muted-foreground: oklch(0.496 0.031 139.432);
  --popover: oklch(0.989 0.01 139.441);
  --popover-foreground: oklch(0.099 0.02 137.51);
  --card: oklch(0.989 0.01 139.441);
  --card-foreground: oklch(0.099 0.02 137.51);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.644 0.195 140.42);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.903 0.007 139.442);
  --secondary-foreground: oklch(0.398 0.019 139.434);
  --accent: oklch(0.849 0.028 139.436);
  --accent-foreground: oklch(0.325 0.032 139.436);
  --destructive: oklch(0.324 0.104 33.922);
  --destructive-foreground: oklch(0.822 0.085 33.059);
  --ring: oklch(0.644 0.195 140.42);
  --chart-1: oklch(0.644 0.195 140.42);
  --chart-2: oklch(0.903 0.007 139.442);
  --chart-3: oklch(0.849 0.028 139.436);
  --chart-4: oklch(0.926 0.006 139.443);
  --chart-5: oklch(0.652 0.2 140.517);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.024 137.843);
  --foreground: oklch(0.993 0.002 139.444);
  --muted: oklch(0.25 0.027 139.439);
  --muted-foreground: oklch(0.72 0.029 139.435);
  --popover: oklch(0.142 0.024 137.843);
  --popover-foreground: oklch(0.993 0.002 139.444);
  --card: oklch(0.142 0.024 137.843);
  --card-foreground: oklch(0.993 0.002 139.444);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.644 0.195 140.42);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.303 0.006 139.439);
  --secondary-foreground: oklch(0.832 0.005 139.442);
  --accent: oklch(0.403 0.029 139.432);
  --accent-foreground: oklch(0.905 0.012 139.441);
  --destructive: oklch(0.647 0.196 34.075);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.644 0.195 140.42);
  --chart-1: oklch(0.644 0.195 140.42);
  --chart-2: oklch(0.303 0.006 139.439);
  --chart-3: oklch(0.403 0.029 139.432);
  --chart-4: oklch(0.334 0.007 139.439);
  --chart-5: oklch(0.652 0.2 140.517);
}