Sharp for shadcn/ui

Sharp is a shadcn/ui theme built around a vivid green primary color (#b4f580) with vivid green accents (#80f585). The light mode uses a neutral background (#fcfefb). Dark mode keeps the vivid green primary (#b4f580) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfefbwhite
#000000black
Foreground
#050901black
#ffffffwhite
Card
#fafdf7mintcream
#030303black
Card foreground
#020501black
#ffffffwhite
Popover
#fcfefbwhite
#000000black
Popover foreground
#050901black
#ffffffwhite
Primary
#b4f580palegreen
#b4f580palegreen
Primary foreground
#1e3d05darkgreen
#1e3d05darkgreen
Secondary
#eff580khaki
#eff580khaki
Secondary foreground
#3b3d05darkolivegreen
#3b3d05darkolivegreen
Muted
#f1f2e9linen
#16160dblack
Muted foreground
#474738darkslategray
#c6c7b8silver
Accent
#80f585lightgreen
#80f585lightgreen
Accent foreground
#053d08darkgreen
#053d08darkgreen
Destructive
#a02d0dbrown
#ef5d34tomato
Destructive foreground
#fde8e3mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b4f580palegreen
#b4f580palegreen

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.89:1AAA
Primary button9.43:1AAA
Secondary button9.69:1AAA
Muted text8.34:1AAA
Accent9.10:1AAA
Destructive6.18:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button9.43:1AAA
Secondary button9.69:1AAA
Muted text10.59:1AAA
Accent9.10:1AAA
Destructive6.25:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 130.474);
  --foreground: oklch(0.13 0.027 128.688);
  --muted: oklch(0.957 0.012 108.937);
  --muted-foreground: oklch(0.394 0.025 109.843);
  --popover: oklch(0.995 0.004 130.474);
  --popover-foreground: oklch(0.13 0.027 128.688);
  --card: oklch(0.989 0.008 130.51);
  --card-foreground: oklch(0.103 0.022 128.688);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.9 0.162 132.514);
  --primary-foreground: oklch(0.325 0.089 134.774);
  --secondary: oklch(0.941 0.141 111.361);
  --secondary-foreground: oklch(0.347 0.073 112.662);
  --accent: oklch(0.875 0.184 144.791);
  --accent-foreground: oklch(0.315 0.099 143.383);
  --destructive: oklch(0.473 0.157 34.973);
  --destructive-foreground: oklch(0.947 0.024 35.952);
  --ring: oklch(0.9 0.162 132.514);
  --chart-1: oklch(0.9 0.162 132.514);
  --chart-2: oklch(0.941 0.141 111.361);
  --chart-3: oklch(0.875 0.184 144.791);
  --chart-4: oklch(0.947 0.128 111.095);
  --chart-5: oklch(0.905 0.167 132.59);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.198 0.017 110.239);
  --muted-foreground: oklch(0.825 0.021 109.175);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.9 0.162 132.514);
  --primary-foreground: oklch(0.325 0.089 134.774);
  --secondary: oklch(0.941 0.141 111.361);
  --secondary-foreground: oklch(0.347 0.073 112.662);
  --accent: oklch(0.875 0.184 144.791);
  --accent-foreground: oklch(0.315 0.099 143.383);
  --destructive: oklch(0.661 0.188 36.049);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.9 0.162 132.514);
  --chart-1: oklch(0.9 0.162 132.514);
  --chart-2: oklch(0.941 0.141 111.361);
  --chart-3: oklch(0.875 0.184 144.791);
  --chart-4: oklch(0.947 0.128 111.095);
  --chart-5: oklch(0.905 0.167 132.59);
}