Cartilage for shadcn/ui

Cartilage is a shadcn/ui theme built around a purple primary color (#d76abe) with cyan accents (#6abed7). The light mode uses a neutral background (#fdf6fc). Dark mode keeps the purple primary (#d76abe) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf6fcsnow
#000000black
Foreground
#090107black
#fdfcfdwhite
Card
#fdf6fcsnow
#000000black
Card foreground
#090107black
#fdfcfdwhite
Popover
#fdf6fcsnow
#000000black
Popover foreground
#090107black
#fdfcfdwhite
Primary
#d76abeorchid
#d76abeorchid
Primary foreground
#0c030ablack
#0c030ablack
Secondary
#bed76adarkkhaki
#bed76adarkkhaki
Secondary foreground
#0a0c03black
#0a0c03black
Muted
#f3f5f0whitesmoke
#0e0f0ablack
Muted foreground
#555553dimgray
#abacaadarkgray
Accent
#6abed7skyblue
#6abed7skyblue
Accent foreground
#030a0cblack
#030a0cblack
Destructive
#9d2a07saddlebrown
#f65c2ctomato
Destructive foreground
#fde1d8mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d76abeorchid
#d76abeorchid

Contrast

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

Light mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button6.48:1AA
Secondary button12.32:1AAA
Muted text6.79:1AA
Accent9.45:1AAA
Destructive6.14:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button6.48:1AA
Secondary button12.32:1AAA
Muted text8.43:1AAA
Accent9.45:1AAA
Destructive6.47:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.01 333.407);
  --foreground: oklch(0.104 0.034 334.392);
  --muted: oklch(0.967 0.006 117.194);
  --muted-foreground: oklch(0.449 0.003 117.189);
  --popover: oklch(0.981 0.01 333.407);
  --popover-foreground: oklch(0.104 0.034 334.392);
  --card: oklch(0.981 0.01 333.407);
  --card-foreground: oklch(0.104 0.034 334.392);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.68 0.169 336.956);
  --primary-foreground: oklch(0.123 0.027 334.42);
  --secondary: oklch(0.838 0.139 120.353);
  --secondary-foreground: oklch(0.149 0.022 117.796);
  --accent: oklch(0.757 0.089 219.821);
  --accent-foreground: oklch(0.137 0.014 213.976);
  --destructive: oklch(0.462 0.156 35.237);
  --destructive-foreground: oklch(0.93 0.034 37.616);
  --ring: oklch(0.68 0.169 336.956);
  --chart-1: oklch(0.68 0.169 336.956);
  --chart-2: oklch(0.838 0.139 120.353);
  --chart-3: oklch(0.757 0.089 219.821);
  --chart-4: oklch(0.851 0.129 120.017);
  --chart-5: oklch(0.68 0.177 337.131);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.003 333.283);
  --muted: oklch(0.166 0.009 118.111);
  --muted-foreground: oklch(0.743 0.002 117.138);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.003 333.283);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.991 0.003 333.283);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.68 0.169 336.956);
  --primary-foreground: oklch(0.123 0.027 334.42);
  --secondary: oklch(0.838 0.139 120.353);
  --secondary-foreground: oklch(0.149 0.022 117.796);
  --accent: oklch(0.757 0.089 219.821);
  --accent-foreground: oklch(0.137 0.014 213.976);
  --destructive: oklch(0.671 0.199 36.752);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.68 0.169 336.956);
  --chart-1: oklch(0.68 0.169 336.956);
  --chart-2: oklch(0.838 0.139 120.353);
  --chart-3: oklch(0.757 0.089 219.821);
  --chart-4: oklch(0.851 0.129 120.017);
  --chart-5: oklch(0.68 0.177 337.131);
}