Castanet for shadcn/ui

Castanet is a shadcn/ui theme built around a deep violet primary color (#411769) with deep teal accents (#176941). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#411769) on a violet-tinted background (#08040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#08040bblack
Foreground
#050109black
#faf9fbghostwhite
Card
#ffffffwhite
#08040bblack
Card foreground
#050109black
#faf9fbghostwhite
Popover
#ffffffwhite
#08040bblack
Popover foreground
#050109black
#faf9fbghostwhite
Primary
#411769indigo
#411769indigo
Primary foreground
#dac0f1thistle
#dac0f1thistle
Secondary
#694117saddlebrown
#694117saddlebrown
Secondary foreground
#f1dac0wheat
#f1dac0wheat
Muted
#e6e1dbgainsboro
#241f19black
Muted foreground
#4e453cdarkslategray
#c3bab1silver
Accent
#176941darkslategray
#176941darkslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a74106saddlebrown
#ec5c09orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#411769indigo
#411769indigo

Contrast

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

Light mode
Text on background20.69:1AAA
Text on card20.69:1AAA
Primary button8.25:1AAA
Secondary button6.56:1AA
Muted text7.19:1AAA
Accent6.74:1AA
Destructive6.15:1AA
Dark mode
Text on background19.38:1AAA
Text on card19.38:1AAA
Primary button8.25:1AAA
Secondary button6.56:1AA
Muted text8.54:1AAA
Accent6.74:1AA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.03 311.383);
  --muted: oklch(0.911 0.01 69.539);
  --muted-foreground: oklch(0.397 0.019 69.098);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.03 311.383);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.098 0.03 311.383);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.318 0.134 302.908);
  --primary-foreground: oklch(0.846 0.072 308.229);
  --secondary: oklch(0.414 0.078 63.989);
  --secondary-foreground: oklch(0.9 0.043 69.109);
  --accent: oklch(0.461 0.1 156.988);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.509 0.147 43.154);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.318 0.134 302.908);
  --chart-1: oklch(0.318 0.134 302.908);
  --chart-2: oklch(0.414 0.078 63.989);
  --chart-3: oklch(0.461 0.1 156.988);
  --chart-4: oklch(0.447 0.086 63.781);
  --chart-5: oklch(0.318 0.138 302.471);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.022 310.372);
  --foreground: oklch(0.984 0.002 309.106);
  --muted: oklch(0.243 0.014 68.959);
  --muted-foreground: oklch(0.795 0.016 69.441);
  --popover: oklch(0.119 0.022 310.372);
  --popover-foreground: oklch(0.984 0.002 309.106);
  --card: oklch(0.119 0.022 310.372);
  --card-foreground: oklch(0.984 0.002 309.106);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.318 0.134 302.908);
  --primary-foreground: oklch(0.846 0.072 308.229);
  --secondary: oklch(0.414 0.078 63.989);
  --secondary-foreground: oklch(0.9 0.043 69.109);
  --accent: oklch(0.461 0.1 156.988);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.655 0.194 42.348);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.318 0.134 302.908);
  --chart-1: oklch(0.318 0.134 302.908);
  --chart-2: oklch(0.414 0.078 63.989);
  --chart-3: oklch(0.461 0.1 156.988);
  --chart-4: oklch(0.447 0.086 63.781);
  --chart-5: oklch(0.318 0.138 302.471);
}