Stable for shadcn/ui

Stable is a shadcn/ui theme built around a violet primary color (#c09adf) with teal accents (#9adfc0). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the violet primary (#c09adf) on a violet-tinted background (#0b0410).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0b0410black
Foreground
#000000black
#fdfcfdwhite
Card
#fdfbfewhite
#0b0410black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fdfbfewhite
#0b0410black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#c09adfplum
#c09adfplum
Primary foreground
#261136midnightblue
#261136midnightblue
Secondary
#dfc09aburlywood
#dfc09aburlywood
Secondary foreground
#362611black
#362611black
Muted
#e8dacagainsboro
#352817darkslategray
Muted foreground
#655f58dimgray
#a7a19adarkgray
Accent
#9adfc0lightblue
#9adfc0lightblue
Accent foreground
#113626darkslategray
#113626darkslategray
Destructive
#9d1b02darkred
#fd3d17orangered
Destructive foreground
#ffd9d2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c09adfplum
#c09adfplum

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.38:1AAA
Primary button7.36:1AAA
Secondary button8.43:1AAA
Muted text4.60:1AA
Accent8.68:1AAA
Destructive6.23:1AA
Dark mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button7.36:1AAA
Secondary button8.43:1AAA
Muted text5.60:1AA
Accent8.68:1AAA
Destructive3.59:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 310.398);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.895 0.027 72.973);
  --muted-foreground: oklch(0.489 0.014 72.989);
  --popover: oklch(0.99 0.004 310.398);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.004 310.398);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.746 0.105 309.109);
  --primary-foreground: oklch(0.229 0.072 307.011);
  --secondary: oklch(0.825 0.062 72.389);
  --secondary-foreground: oklch(0.282 0.041 70.325);
  --accent: oklch(0.85 0.082 164.776);
  --accent-foreground: oklch(0.302 0.053 161.201);
  --destructive: oklch(0.449 0.167 32.398);
  --destructive-foreground: oklch(0.915 0.043 31.209);
  --ring: oklch(0.746 0.105 309.109);
  --chart-1: oklch(0.746 0.105 309.109);
  --chart-2: oklch(0.825 0.062 72.389);
  --chart-3: oklch(0.85 0.082 164.776);
  --chart-4: oklch(0.846 0.055 72.553);
  --chart-5: oklch(0.743 0.111 309.023);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.03 310.351);
  --foreground: oklch(0.991 0.002 310.414);
  --muted: oklch(0.287 0.034 71.395);
  --muted-foreground: oklch(0.713 0.012 73.083);
  --popover: oklch(0.13 0.03 310.351);
  --popover-foreground: oklch(0.991 0.002 310.414);
  --card: oklch(0.13 0.03 310.351);
  --card-foreground: oklch(0.991 0.002 310.414);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.746 0.105 309.109);
  --primary-foreground: oklch(0.229 0.072 307.011);
  --secondary: oklch(0.825 0.062 72.389);
  --secondary-foreground: oklch(0.282 0.041 70.325);
  --accent: oklch(0.85 0.082 164.776);
  --accent-foreground: oklch(0.302 0.053 161.201);
  --destructive: oklch(0.65 0.231 32.624);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.746 0.105 309.109);
  --chart-1: oklch(0.746 0.105 309.109);
  --chart-2: oklch(0.825 0.062 72.389);
  --chart-3: oklch(0.85 0.082 164.776);
  --chart-4: oklch(0.846 0.055 72.553);
  --chart-5: oklch(0.743 0.111 309.023);
}