Quilt for shadcn/ui

Quilt is a shadcn/ui theme built around a deep green primary color (#49502a) with deep purple accents (#502a49). The light mode uses a neutral background (#fcfdf7). Dark mode keeps the deep green primary (#49502a) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#fcfdf7snow
#030401black
Foreground
#0f1202black
#ffffffwhite
Card
#fcfdf7snow
#030401black
Card foreground
#0f1202black
#ffffffwhite
Popover
#fcfdf7snow
#030401black
Popover foreground
#0f1202black
#ffffffwhite
Primary
#49502adarkolivegreen
#49502adarkolivegreen
Primary foreground
#dee3cagainsboro
#dee3cagainsboro
Secondary
#2a4950darkslategray
#2a4950darkslategray
Secondary foreground
#cadee3gainsboro
#cadee3gainsboro
Muted
#e7f1f3lavender
#0c1518black
Muted foreground
#4b5e63dimgray
#9cb0b4darkgray
Accent
#502a49darkslategray
#502a49darkslategray
Accent foreground
#e3cadethistle
#e3cadethistle
Destructive
#9c2a07saddlebrown
#db3b0aorangered
Destructive foreground
#fde1d8mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#49502adarkolivegreen
#49502adarkolivegreen

Contrast

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

Light mode
Text on background18.54:1AAA
Text on card18.54:1AAA
Primary button6.45:1AA
Secondary button6.93:1AA
Muted text5.92:1AA
Accent7.76:1AAA
Destructive6.17:1AA
Dark mode
Text on background20.55:1AAA
Text on card20.55:1AAA
Primary button6.45:1AA
Secondary button6.93:1AA
Muted text8.14:1AAA
Accent7.76:1AAA
Destructive4.51:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.009 114.985);
  --foreground: oklch(0.174 0.033 117.332);
  --muted: oklch(0.951 0.01 212.673);
  --muted-foreground: oklch(0.469 0.025 212.883);
  --popover: oklch(0.992 0.009 114.985);
  --popover-foreground: oklch(0.174 0.033 117.332);
  --card: oklch(0.992 0.009 114.985);
  --card-foreground: oklch(0.174 0.033 117.332);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.416 0.058 117.523);
  --primary-foreground: oklch(0.905 0.034 115.518);
  --secondary: oklch(0.385 0.039 213.582);
  --secondary-foreground: oklch(0.887 0.023 212.714);
  --accent: oklch(0.347 0.073 334.136);
  --accent-foreground: oklch(0.865 0.039 332.039);
  --destructive: oklch(0.461 0.155 35.319);
  --destructive-foreground: oklch(0.93 0.034 37.617);
  --ring: oklch(0.416 0.058 117.523);
  --chart-1: oklch(0.416 0.058 117.523);
  --chart-2: oklch(0.385 0.039 213.582);
  --chart-3: oklch(0.347 0.073 334.136);
  --chart-4: oklch(0.417 0.042 213.62);
  --chart-5: oklch(0.421 0.063 117.736);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.013 115.444);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.19 0.014 213.137);
  --muted-foreground: oklch(0.743 0.023 212.735);
  --popover: oklch(0.102 0.013 115.444);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.102 0.013 115.444);
  --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.416 0.058 117.523);
  --primary-foreground: oklch(0.905 0.034 115.518);
  --secondary: oklch(0.385 0.039 213.582);
  --secondary-foreground: oklch(0.887 0.023 212.714);
  --accent: oklch(0.347 0.073 334.136);
  --accent-foreground: oklch(0.865 0.039 332.039);
  --destructive: oklch(0.59 0.203 34.856);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.416 0.058 117.523);
  --chart-1: oklch(0.416 0.058 117.523);
  --chart-2: oklch(0.385 0.039 213.582);
  --chart-3: oklch(0.347 0.073 334.136);
  --chart-4: oklch(0.417 0.042 213.62);
  --chart-5: oklch(0.421 0.063 117.736);
}