Classification for shadcn/ui

Classification is a shadcn/ui theme built around a muted deep violet primary color (#423248) with muted deep green accents (#384832). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted deep violet primary (#423248) on a violet-tinted background (#0c070e).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0c070eblack
Foreground
#0c050fblack
#fdfcfdwhite
Card
#fbf7fcghostwhite
#0f0811black
Card foreground
#09040bblack
#ffffffwhite
Popover
#fbf7fcghostwhite
#0f0811black
Popover foreground
#09040bblack
#ffffffwhite
Primary
#423248darkslategray
#423248darkslategray
Primary foreground
#d9cfdelightgrey
#d9cfdelightgrey
Secondary
#384832darkslategray
#384832darkslategray
Secondary foreground
#d3decflightgrey
#d3decflightgrey
Muted
#e5eee2beige
#141d11black
Muted foreground
#4d544adarkslategray
#aeb5abdarkgray
Accent
#384832darkslategray
#384832darkslategray
Accent foreground
#d3decflightgrey
#d3decflightgrey
Destructive
#c03b02firebrick
#fd7135tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#423248darkslategray
#423248darkslategray

Contrast

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

Light mode
Text on background19.56:1AAA
Text on card19.22:1AAA
Primary button7.80:1AAA
Secondary button7.03:1AAA
Muted text6.59:1AA
Accent7.03:1AAA
Destructive5.43:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.74:1AAA
Primary button7.80:1AAA
Secondary button7.03:1AAA
Muted text8.22:1AAA
Accent7.03:1AAA
Destructive7.58:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 316.598);
  --foreground: oklch(0.135 0.027 316.995);
  --muted: oklch(0.94 0.019 136.67);
  --muted-foreground: oklch(0.436 0.018 136.733);
  --popover: oklch(0.982 0.007 316.587);
  --popover-foreground: oklch(0.122 0.024 318.126);
  --card: oklch(0.982 0.007 316.587);
  --card-foreground: oklch(0.122 0.024 318.126);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.345 0.043 316.234);
  --primary-foreground: oklch(0.867 0.023 316.531);
  --secondary: oklch(0.382 0.042 136.984);
  --secondary-foreground: oklch(0.887 0.023 136.687);
  --accent: oklch(0.382 0.042 136.984);
  --accent-foreground: oklch(0.887 0.023 136.687);
  --destructive: oklch(0.543 0.178 37.731);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.345 0.043 316.234);
  --chart-1: oklch(0.345 0.043 316.234);
  --chart-2: oklch(0.382 0.042 136.984);
  --chart-3: oklch(0.382 0.042 136.984);
  --chart-4: oklch(0.413 0.046 136.993);
  --chart-5: oklch(0.342 0.05 316.162);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.019 316.826);
  --foreground: oklch(0.992 0.002 316.604);
  --muted: oklch(0.218 0.027 137.045);
  --muted-foreground: oklch(0.764 0.015 136.669);
  --popover: oklch(0.15 0.022 316.288);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.15 0.022 316.288);
  --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.345 0.043 316.234);
  --primary-foreground: oklch(0.867 0.023 316.531);
  --secondary: oklch(0.382 0.042 136.984);
  --secondary-foreground: oklch(0.887 0.023 136.687);
  --accent: oklch(0.382 0.042 136.984);
  --accent-foreground: oklch(0.887 0.023 136.687);
  --destructive: oklch(0.71 0.186 41.63);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.345 0.043 316.234);
  --chart-1: oklch(0.345 0.043 316.234);
  --chart-2: oklch(0.382 0.042 136.984);
  --chart-3: oklch(0.382 0.042 136.984);
  --chart-4: oklch(0.413 0.046 136.993);
  --chart-5: oklch(0.342 0.05 316.162);
}