XD Theme for shadcn/ui

XD Theme is a shadcn/ui theme built around a vivid light teal primary color (#f0ffff) with muted blue accents (#424b67). The light mode uses a blue-tinted background (#242938). Dark mode keeps the vivid light teal primary (#f0ffff) on a blue-tinted background (#242938).

Color palette

TokenLightDark
Background
#242938darkslategray
#242938darkslategray
Foreground
#bec8d5lightsteelblue
#bec8d5lightsteelblue
Card
#202432darkslategray
#202432darkslategray
Card foreground
#ced5dflightgrey
#ced5dflightgrey
Popover
#1e222fdarkslategray
#1e222fdarkslategray
Popover foreground
#dde2e9gainsboro
#dde2e9gainsboro
Primary
#f0ffffazure
#f0ffffazure
Primary foreground
#005757darkslategray
#005757darkslategray
Secondary
#2d5353darkslategray
#2d5353darkslategray
Secondary foreground
#cde4e4gainsboro
#cde4e4gainsboro
Muted
#31353fdarkslategray
#31353fdarkslategray
Muted foreground
#afb3c0silver
#afb3c0silver
Accent
#424b67darkslategray
#424b67darkslategray
Accent foreground
#e9ebf1lavender
#e9ebf1lavender
Destructive
#e22f18orangered
#e22f18orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#343742darkslategray
#343742darkslategray
Input
#3a3e4adarkslategray
#3a3e4adarkslategray
Ring
#f0ffffazure
#f0ffffazure

Contrast

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

Light mode
Text on background8.58:1AAA
Text on card10.42:1AAA
Primary button8.17:1AAA
Secondary button6.40:1AA
Muted text5.87:1AA
Accent7.25:1AAA
Destructive4.50:1AA
Dark mode
Text on background8.58:1AAA
Text on card10.42:1AAA
Primary button8.17:1AAA
Secondary button6.40:1AA
Muted text5.87:1AA
Accent7.25:1AAA
Destructive4.50:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.282 0.029 270.186);
  --foreground: oklch(0.83 0.021 253.376);
  --muted: oklch(0.329 0.018 270.801);
  --muted-foreground: oklch(0.768 0.019 271.166);
  --popover: oklch(0.254 0.025 270.255);
  --popover-foreground: oklch(0.912 0.011 253.296);
  --card: oklch(0.263 0.026 270.23);
  --card-foreground: oklch(0.871 0.015 253.335);
  --border: oklch(0.338 0.019 270.795);
  --input: oklch(0.366 0.021 270.778);
  --primary: oklch(0.989 0.016 196.897);
  --primary-foreground: oklch(0.413 0.07 194.769);
  --secondary: oklch(0.414 0.044 195.596);
  --secondary-foreground: oklch(0.903 0.024 196.729);
  --accent: oklch(0.416 0.048 269.994);
  --accent-foreground: oklch(0.941 0.008 271.327);
  --destructive: oklch(0.593 0.216 31.022);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.989 0.016 196.897);
  --chart-1: oklch(0.989 0.016 196.897);
  --chart-2: oklch(0.414 0.044 195.596);
  --chart-3: oklch(0.416 0.048 269.994);
  --chart-4: oklch(0.447 0.048 195.577);
  --chart-5: oklch(0.989 0.017 196.89);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.282 0.029 270.186);
  --foreground: oklch(0.83 0.021 253.376);
  --muted: oklch(0.329 0.018 270.801);
  --muted-foreground: oklch(0.768 0.019 271.166);
  --popover: oklch(0.254 0.025 270.255);
  --popover-foreground: oklch(0.912 0.011 253.296);
  --card: oklch(0.263 0.026 270.23);
  --card-foreground: oklch(0.871 0.015 253.335);
  --border: oklch(0.338 0.019 270.795);
  --input: oklch(0.366 0.021 270.778);
  --primary: oklch(0.989 0.016 196.897);
  --primary-foreground: oklch(0.413 0.07 194.769);
  --secondary: oklch(0.414 0.044 195.596);
  --secondary-foreground: oklch(0.903 0.024 196.729);
  --accent: oklch(0.416 0.048 269.994);
  --accent-foreground: oklch(0.941 0.008 271.327);
  --destructive: oklch(0.593 0.216 31.022);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.989 0.016 196.897);
  --chart-1: oklch(0.989 0.016 196.897);
  --chart-2: oklch(0.414 0.044 195.596);
  --chart-3: oklch(0.416 0.048 269.994);
  --chart-4: oklch(0.447 0.048 195.577);
  --chart-5: oklch(0.989 0.017 196.89);
}