Fleece for shadcn/ui

Fleece is a shadcn/ui theme built around a muted deep indigo primary color (#2a2c46) with muted deep violet accents (#362a46). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the muted deep indigo primary (#2a2c46) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#000000black
Foreground
#03030dblack
#f6f6f9whitesmoke
Card
#f7f7fdghostwhite
#030303black
Card foreground
#020209black
#f9f9fbghostwhite
Popover
#fbfbfeghostwhite
#000000black
Popover foreground
#03030dblack
#f6f6f9whitesmoke
Primary
#2a2c46darkslategray
#2a2c46darkslategray
Primary foreground
#c6c7ddthistle
#c6c7ddthistle
Secondary
#2a3a46darkslategray
#2a3a46darkslategray
Secondary foreground
#c6d3ddlightgrey
#c6d3ddlightgrey
Muted
#d5d9ddgainsboro
#22272adarkslategray
Muted foreground
#3a434adarkslategray
#b5bec5silver
Accent
#362a46darkslategray
#362a46darkslategray
Accent foreground
#d0c6ddthistle
#d0c6ddthistle
Destructive
#8b0d04darkred
#f94639tomato
Destructive foreground
#fdc7c4pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a2c46darkslategray
#2a2c46darkslategray

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.38:1AAA
Primary button8.15:1AAA
Secondary button7.67:1AAA
Muted text7.11:1AAA
Accent8.10:1AAA
Destructive6.57:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.66:1AAA
Primary button8.15:1AAA
Secondary button7.67:1AAA
Muted text8.01:1AAA
Accent8.10:1AAA
Destructive3.52:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 283.037);
  --foreground: oklch(0.106 0.028 275.525);
  --muted: oklch(0.884 0.007 240.396);
  --muted-foreground: oklch(0.379 0.017 240.915);
  --popover: oklch(0.989 0.004 283.037);
  --popover-foreground: oklch(0.106 0.028 275.525);
  --card: oklch(0.978 0.008 282.965);
  --card-foreground: oklch(0.093 0.024 275.53);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.304 0.047 280.058);
  --primary-foreground: oklch(0.836 0.03 282.481);
  --secondary: oklch(0.34 0.03 241.658);
  --secondary-foreground: oklch(0.859 0.02 240.604);
  --accent: oklch(0.312 0.051 303.475);
  --accent-foreground: oklch(0.84 0.033 305.213);
  --destructive: oklch(0.405 0.158 29.942);
  --destructive-foreground: oklch(0.877 0.062 23.133);
  --ring: oklch(0.304 0.047 280.058);
  --chart-1: oklch(0.304 0.047 280.058);
  --chart-2: oklch(0.34 0.03 241.658);
  --chart-3: oklch(0.312 0.051 303.475);
  --chart-4: oklch(0.369 0.033 241.698);
  --chart-5: oklch(0.3 0.053 279.574);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.003 283.054);
  --muted: oklch(0.269 0.01 240.791);
  --muted-foreground: oklch(0.796 0.014 240.527);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.975 0.003 283.054);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.983 0.002 283.072);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.304 0.047 280.058);
  --primary-foreground: oklch(0.836 0.03 282.481);
  --secondary: oklch(0.34 0.03 241.658);
  --secondary-foreground: oklch(0.859 0.02 240.604);
  --accent: oklch(0.312 0.051 303.475);
  --accent-foreground: oklch(0.84 0.033 305.213);
  --destructive: oklch(0.654 0.217 28.658);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.304 0.047 280.058);
  --chart-1: oklch(0.304 0.047 280.058);
  --chart-2: oklch(0.34 0.03 241.658);
  --chart-3: oklch(0.312 0.051 303.475);
  --chart-4: oklch(0.369 0.033 241.698);
  --chart-5: oklch(0.3 0.053 279.574);
}