Tangible for shadcn/ui

Tangible is a shadcn/ui theme built around a muted deep purple primary color (#2f2730) with muted deep green accents (#273027). The light mode uses a neutral background (#fefbfe). Dark mode keeps the muted deep purple primary (#2f2730) on a neutral background (#070308).

Color palette

TokenLightDark
Background
#fefbfewhite
#070308black
Foreground
#150317black
#f8f6f8whitesmoke
Card
#fdf7fdsnow
#0b040bblack
Card foreground
#110212black
#faf9fbghostwhite
Popover
#fefbfewhite
#070308black
Popover foreground
#150317black
#f8f6f8whitesmoke
Primary
#2f2730darkslategray
#2f2730darkslategray
Primary foreground
#cabecbsilver
#cabecbsilver
Secondary
#273027darkslategray
#273027darkslategray
Secondary foreground
#bfcbbesilver
#bfcbbesilver
Muted
#eaf6eahoneydew
#0a1509black
Muted foreground
#425440darkslategray
#adbfabdarkgray
Accent
#273027darkslategray
#273027darkslategray
Accent foreground
#bfcbbesilver
#bfcbbesilver
Destructive
#ad330bfirebrick
#eb460forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f2730darkslategray
#2f2730darkslategray

Contrast

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

Light mode
Text on background19.30:1AAA
Text on card19.05:1AAA
Primary button8.09:1AAA
Secondary button8.11:1AAA
Muted text7.32:1AAA
Accent8.11:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.07:1AAA
Text on card19.31:1AAA
Primary button8.09:1AAA
Secondary button8.11:1AAA
Muted text9.59:1AAA
Accent8.11:1AAA
Destructive3.88:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 323.664);
  --foreground: oklch(0.149 0.053 325.359);
  --muted: oklch(0.961 0.02 143.524);
  --muted-foreground: oklch(0.423 0.038 143.143);
  --popover: oklch(0.991 0.006 323.664);
  --popover-foreground: oklch(0.149 0.053 325.359);
  --card: oklch(0.981 0.011 323.694);
  --card-foreground: oklch(0.135 0.046 325.496);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.285 0.021 324.012);
  --primary-foreground: oklch(0.815 0.022 323.776);
  --secondary: oklch(0.298 0.021 143.258);
  --secondary-foreground: oklch(0.829 0.022 143.494);
  --accent: oklch(0.298 0.021 143.258);
  --accent-foreground: oklch(0.829 0.022 143.494);
  --destructive: oklch(0.501 0.164 36.292);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.285 0.021 324.012);
  --chart-1: oklch(0.285 0.021 324.012);
  --chart-2: oklch(0.298 0.021 143.258);
  --chart-3: oklch(0.298 0.021 143.258);
  --chart-4: oklch(0.33 0.024 143.244);
  --chart-5: oklch(0.284 0.027 324.111);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.022 325.143);
  --foreground: oklch(0.976 0.003 323.652);
  --muted: oklch(0.182 0.03 142.711);
  --muted-foreground: oklch(0.784 0.033 143.41);
  --popover: oklch(0.109 0.022 325.143);
  --popover-foreground: oklch(0.976 0.003 323.652);
  --card: oklch(0.125 0.025 325.032);
  --card-foreground: oklch(0.984 0.002 323.646);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.285 0.021 324.012);
  --primary-foreground: oklch(0.815 0.022 323.776);
  --secondary: oklch(0.298 0.021 143.258);
  --secondary-foreground: oklch(0.829 0.022 143.494);
  --accent: oklch(0.298 0.021 143.258);
  --accent-foreground: oklch(0.829 0.022 143.494);
  --destructive: oklch(0.628 0.209 35.918);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.285 0.021 324.012);
  --chart-1: oklch(0.285 0.021 324.012);
  --chart-2: oklch(0.298 0.021 143.258);
  --chart-3: oklch(0.298 0.021 143.258);
  --chart-4: oklch(0.33 0.024 143.244);
  --chart-5: oklch(0.284 0.027 324.111);
}