Diadem for shadcn/ui

Diadem is a shadcn/ui theme built around a muted orange primary color (#cdc0ac) with muted violet accents (#c0accd). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted orange primary (#cdc0ac) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#ffffffwhite
#040301black
Foreground
#090601black
#f9f8f6whitesmoke
Card
#ffffffwhite
#040301black
Card foreground
#090601black
#f9f8f6whitesmoke
Popover
#ffffffwhite
#040301black
Popover foreground
#090601black
#f9f8f6whitesmoke
Primary
#cdc0acsilver
#cdc0acsilver
Primary foreground
#2d251bblack
#2d251bblack
Secondary
#accdc0silver
#accdc0silver
Secondary foreground
#1b2d25darkslategray
#1b2d25darkslategray
Muted
#d3e4ddgainsboro
#1b2c25darkslategray
Muted foreground
#606c67dimgray
#939f9adarkgray
Accent
#c0accdsilver
#c0accdsilver
Accent foreground
#251b2ddarkslategray
#251b2ddarkslategray
Destructive
#99330bsaddlebrown
#f0652dtomato
Destructive foreground
#fce3d9antiquewhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cdc0acsilver
#cdc0acsilver

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button8.43:1AAA
Secondary button8.47:1AAA
Muted text4.13:1AA Large
Accent7.88:1AAA
Destructive6.06:1AA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button8.43:1AAA
Secondary button8.47:1AAA
Muted text5.32:1AA
Accent7.88:1AAA
Destructive6.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.02 87.786);
  --muted: oklch(0.904 0.02 169.962);
  --muted-foreground: oklch(0.52 0.017 169.674);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.02 87.786);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.02 87.786);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.813 0.031 78.13);
  --primary-foreground: oklch(0.271 0.022 77.693);
  --secondary: oklch(0.821 0.04 169.154);
  --secondary-foreground: oklch(0.277 0.027 167.408);
  --accent: oklch(0.772 0.051 311.866);
  --accent-foreground: oklch(0.243 0.036 311.22);
  --destructive: oklch(0.465 0.144 38.486);
  --destructive-foreground: oklch(0.934 0.031 42.863);
  --ring: oklch(0.813 0.031 78.13);
  --chart-1: oklch(0.813 0.031 78.13);
  --chart-2: oklch(0.821 0.04 169.154);
  --chart-3: oklch(0.772 0.051 311.866);
  --chart-4: oklch(0.842 0.035 169.37);
  --chart-5: oklch(0.815 0.035 78.098);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.008 83.666);
  --foreground: oklch(0.978 0.003 78.304);
  --muted: oklch(0.277 0.026 167.536);
  --muted-foreground: oklch(0.692 0.016 169.964);
  --popover: oklch(0.095 0.008 83.666);
  --popover-foreground: oklch(0.978 0.003 78.304);
  --card: oklch(0.095 0.008 83.666);
  --card-foreground: oklch(0.978 0.003 78.304);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.813 0.031 78.13);
  --primary-foreground: oklch(0.271 0.022 77.693);
  --secondary: oklch(0.821 0.04 169.154);
  --secondary-foreground: oklch(0.277 0.027 167.408);
  --accent: oklch(0.772 0.051 311.866);
  --accent-foreground: oklch(0.243 0.036 311.22);
  --destructive: oklch(0.674 0.185 40.12);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.813 0.031 78.13);
  --chart-1: oklch(0.813 0.031 78.13);
  --chart-2: oklch(0.821 0.04 169.154);
  --chart-3: oklch(0.772 0.051 311.866);
  --chart-4: oklch(0.842 0.035 169.37);
  --chart-5: oklch(0.815 0.035 78.098);
}