Dynamic Ravenclaw for shadcn/ui

Dynamic Ravenclaw is a shadcn/ui theme built around a vivid deep indigo primary color (#0c0551) with muted light indigo accents (#dedee3). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the vivid deep indigo primary (#0c0551) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#020104black
Foreground
#030208black
#f9f9fbghostwhite
Card
#fcfcfdwhite
#020104black
Card foreground
#030208black
#f9f9fbghostwhite
Popover
#fcfcfdwhite
#020104black
Popover foreground
#030208black
#f9f9fbghostwhite
Primary
#0c0551midnightblue
#0c0551midnightblue
Primary foreground
#9991f8mediumpurple
#9991f8mediumpurple
Secondary
#dedee3gainsboro
#2d2c35darkslategray
Secondary foreground
#43424ddarkslategray
#c5c5cesilver
Muted
#e7e6eflavender
#101019black
Muted foreground
#504e6adimgray
#9895b1darkgray
Accent
#dedee3gainsboro
#2d2c35darkslategray
Accent foreground
#43424ddarkslategray
#c5c5cesilver
Destructive
#7f1805maroon
#f02c0aorangered
Destructive foreground
#fcc4balightpink
#ffffffwhite
Border
#e8e8edlavender
#1b1a23black
Input
#e8e8edlavender
#1b1a23black
Ring
#0c0551midnightblue
#0c0551midnightblue

Contrast

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

Light mode
Text on background20.10:1AAA
Text on card20.10:1AAA
Primary button6.70:1AA
Secondary button7.37:1AAA
Muted text6.41:1AA
Accent7.37:1AAA
Destructive6.74:1AA
Dark mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button6.70:1AA
Secondary button8.04:1AAA
Muted text6.55:1AA
Accent8.04:1AAA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.002 290.204);
  --foreground: oklch(0.098 0.019 287.553);
  --muted: oklch(0.928 0.013 289.978);
  --muted-foreground: oklch(0.437 0.045 288.202);
  --popover: oklch(0.99 0.002 290.204);
  --popover-foreground: oklch(0.098 0.019 287.553);
  --card: oklch(0.99 0.002 290.204);
  --card-foreground: oklch(0.098 0.019 287.553);
  --border: oklch(0.932 0.008 290.092);
  --input: oklch(0.932 0.008 290.092);
  --primary: oklch(0.213 0.127 271.804);
  --primary-foreground: oklch(0.707 0.148 285.754);
  --secondary: oklch(0.902 0.007 290.108);
  --secondary-foreground: oklch(0.383 0.019 289.279);
  --accent: oklch(0.902 0.007 290.108);
  --accent-foreground: oklch(0.383 0.019 289.279);
  --destructive: oklch(0.389 0.141 32.175);
  --destructive-foreground: oklch(0.868 0.066 29.93);
  --ring: oklch(0.213 0.127 271.804);
  --chart-1: oklch(0.213 0.127 271.804);
  --chart-2: oklch(0.902 0.007 290.108);
  --chart-3: oklch(0.902 0.007 290.108);
  --chart-4: oklch(0.927 0.005 290.146);
  --chart-5: oklch(0.212 0.13 271.052);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.08 0.013 288.203);
  --foreground: oklch(0.983 0.002 290.205);
  --muted: oklch(0.177 0.02 287.975);
  --muted-foreground: oklch(0.682 0.04 289.106);
  --popover: oklch(0.08 0.013 288.203);
  --popover-foreground: oklch(0.983 0.002 290.205);
  --card: oklch(0.08 0.013 288.203);
  --card-foreground: oklch(0.983 0.002 290.205);
  --border: oklch(0.224 0.017 288.804);
  --input: oklch(0.224 0.017 288.804);
  --primary: oklch(0.213 0.127 271.804);
  --primary-foreground: oklch(0.707 0.148 285.754);
  --secondary: oklch(0.298 0.016 289.233);
  --secondary-foreground: oklch(0.826 0.013 289.941);
  --accent: oklch(0.298 0.016 289.233);
  --accent-foreground: oklch(0.826 0.013 289.941);
  --destructive: oklch(0.616 0.231 31.614);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.213 0.127 271.804);
  --chart-1: oklch(0.213 0.127 271.804);
  --chart-2: oklch(0.298 0.016 289.233);
  --chart-3: oklch(0.298 0.016 289.233);
  --chart-4: oklch(0.326 0.018 289.198);
  --chart-5: oklch(0.212 0.13 271.052);
}