Quantity for shadcn/ui

Quantity is a shadcn/ui theme built around a deep green primary color (#41651f) with deep violet accents (#431f65). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#41651f) on a green-tinted background (#0a0e06).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0e06black
Foreground
#0d1406black
#fafbf9snow
Card
#ffffffwhite
#0a0e06black
Card foreground
#0d1406black
#fafbf9snow
Popover
#ffffffwhite
#0a0e06black
Popover foreground
#0d1406black
#fafbf9snow
Primary
#41651fdarkolivegreen
#41651fdarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#431f65indigo
#431f65indigo
Secondary foreground
#dcc8eethistle
#dcc8eethistle
Muted
#f2f1f4whitesmoke
#0d0b0eblack
Muted foreground
#4f4b53darkslategray
#b0acb4darkgray
Accent
#431f65indigo
#431f65indigo
Accent foreground
#dcc8eethistle
#dcc8eethistle
Destructive
#5e1608maroon
#ed4c2ctomato
Destructive foreground
#f7afa1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#41651fdarkolivegreen
#41651fdarkolivegreen

Contrast

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

Light mode
Text on background18.75:1AAA
Text on card18.75:1AAA
Primary button6.72:1AA
Secondary button8.30:1AAA
Muted text7.57:1AAA
Accent8.30:1AAA
Destructive7.26:1AAA
Dark mode
Text on background18.72:1AAA
Text on card18.72:1AAA
Primary button6.72:1AA
Secondary button8.30:1AAA
Muted text8.76:1AAA
Accent8.30:1AAA
Destructive3.71:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.178 0.03 130.429);
  --muted: oklch(0.96 0.004 309.082);
  --muted-foreground: oklch(0.42 0.014 308.778);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.178 0.03 130.429);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.178 0.03 130.429);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.465 0.107 132.574);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.33 0.119 304.337);
  --secondary-foreground: oklch(0.862 0.056 308.449);
  --accent: oklch(0.33 0.119 304.337);
  --accent-foreground: oklch(0.862 0.056 308.449);
  --destructive: oklch(0.322 0.106 33.136);
  --destructive-foreground: oklch(0.819 0.087 31.625);
  --ring: oklch(0.465 0.107 132.574);
  --chart-1: oklch(0.465 0.107 132.574);
  --chart-2: oklch(0.33 0.119 304.337);
  --chart-3: oklch(0.33 0.119 304.337);
  --chart-4: oklch(0.354 0.13 304.213);
  --chart-5: oklch(0.47 0.112 132.781);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.019 129.319);
  --foreground: oklch(0.986 0.002 129.152);
  --muted: oklch(0.154 0.006 308.695);
  --muted-foreground: oklch(0.75 0.012 308.957);
  --popover: oklch(0.157 0.019 129.319);
  --popover-foreground: oklch(0.986 0.002 129.152);
  --card: oklch(0.157 0.019 129.319);
  --card-foreground: oklch(0.986 0.002 129.152);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.465 0.107 132.574);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.33 0.119 304.337);
  --secondary-foreground: oklch(0.862 0.056 308.449);
  --accent: oklch(0.33 0.119 304.337);
  --accent-foreground: oklch(0.862 0.056 308.449);
  --destructive: oklch(0.638 0.202 33.172);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.465 0.107 132.574);
  --chart-1: oklch(0.465 0.107 132.574);
  --chart-2: oklch(0.33 0.119 304.337);
  --chart-3: oklch(0.33 0.119 304.337);
  --chart-4: oklch(0.354 0.13 304.213);
  --chart-5: oklch(0.47 0.112 132.781);
}