Dragon for shadcn/ui

Dragon is a shadcn/ui theme built around a muted deep yellow primary color (#12100c) with muted deep violet accents (#100c12). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the muted deep yellow primary (#12100c) on a yellow-tinted background (#0a0905).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#0a0905black
Foreground
#151004black
#ffffffwhite
Card
#fcfbf8snow
#0d0b07black
Card foreground
#110d03black
#ffffffwhite
Popover
#fcfbf8snow
#0d0b07black
Popover foreground
#110d03black
#ffffffwhite
Primary
#12100cblack
#12100cblack
Primary foreground
#baaf97darkgray
#baaf97darkgray
Secondary
#0c1210black
#0c1210black
Secondary foreground
#97baafdarkgray
#97baafdarkgray
Muted
#d7e5e1gainsboro
#1a2824black
Muted foreground
#444b49darkslategray
#b4bbb9silver
Accent
#100c12black
#100c12black
Accent foreground
#af97badarkgray
#af97badarkgray
Destructive
#d54107orangered
#f85312orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#12100cblack
#12100cblack

Contrast

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

Light mode
Text on background18.61:1AAA
Text on card18.70:1AAA
Primary button8.72:1AAA
Secondary button8.95:1AAA
Muted text6.89:1AA
Accent7.33:1AAA
Destructive4.58:1AA
Dark mode
Text on background19.95:1AAA
Text on card19.62:1AAA
Primary button8.72:1AAA
Secondary button8.95:1AAA
Muted text7.79:1AAA
Accent7.33:1AAA
Destructive3.37:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 86.015);
  --foreground: oklch(0.175 0.025 87.301);
  --muted: oklch(0.91 0.017 175.07);
  --muted-foreground: oklch(0.405 0.01 174.879);
  --popover: oklch(0.987 0.004 86.023);
  --popover-foreground: oklch(0.16 0.022 89.054);
  --card: oklch(0.987 0.004 86.023);
  --card-foreground: oklch(0.16 0.022 89.054);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.176 0.009 86.087);
  --primary-foreground: oklch(0.756 0.035 86.092);
  --secondary: oklch(0.177 0.01 173.791);
  --secondary-foreground: oklch(0.759 0.041 173.951);
  --accent: oklch(0.164 0.014 315.059);
  --accent-foreground: oklch(0.709 0.056 315.093);
  --destructive: oklch(0.585 0.193 37.044);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.176 0.009 86.087);
  --chart-1: oklch(0.176 0.009 86.087);
  --chart-2: oklch(0.177 0.01 173.791);
  --chart-3: oklch(0.164 0.014 315.059);
  --chart-4: oklch(0.214 0.015 173.45);
  --chart-5: oklch(0.177 0.01 86.072);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.009 89.381);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.264 0.022 172.927);
  --muted-foreground: oklch(0.786 0.009 175.296);
  --popover: oklch(0.152 0.01 87.37);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.152 0.01 87.37);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.176 0.009 86.087);
  --primary-foreground: oklch(0.756 0.035 86.092);
  --secondary: oklch(0.177 0.01 173.791);
  --secondary-foreground: oklch(0.759 0.041 173.951);
  --accent: oklch(0.164 0.014 315.059);
  --accent-foreground: oklch(0.709 0.056 315.093);
  --destructive: oklch(0.662 0.211 37.821);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.176 0.009 86.087);
  --chart-1: oklch(0.176 0.009 86.087);
  --chart-2: oklch(0.177 0.01 173.791);
  --chart-3: oklch(0.164 0.014 315.059);
  --chart-4: oklch(0.214 0.015 173.45);
  --chart-5: oklch(0.177 0.01 86.072);
}