Colorless for shadcn/ui

Colorless is a shadcn/ui theme built around a vivid deep violet primary color (#68058f) with vivid deep purple accents (#8f0571). The light mode uses a neutral background (#fbf7fc). Dark mode keeps the vivid deep violet primary (#68058f) on a violet-tinted background (#0d0410).

Color palette

TokenLightDark
Background
#fbf7fcghostwhite
#0d0410black
Foreground
#060208black
#fbf8fcghostwhite
Card
#f9f4fbghostwhite
#100514black
Card foreground
#030104black
#fdfbfdsnow
Popover
#fbf7fcghostwhite
#0d0410black
Popover foreground
#060208black
#fbf8fcghostwhite
Primary
#68058fpurple
#68058fpurple
Primary foreground
#eec9fdlavender
#eec9fdlavender
Secondary
#23058fdarkblue
#23058fdarkblue
Secondary foreground
#d4c9fdlavender
#d4c9fdlavender
Muted
#e7e6ealavender
#161519black
Muted foreground
#5e5b67dimgray
#9b98a4darkgray
Accent
#8f0571purple
#8f0571purple
Accent foreground
#fdc9f2mistyrose
#fdc9f2mistyrose
Destructive
#7d0d03maroon
#fb3a28orangered
Destructive foreground
#fdbab4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#68058fpurple
#68058fpurple

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.11:1AAA
Primary button7.19:1AAA
Secondary button9.11:1AAA
Muted text5.35:1AA
Accent6.11:1AA
Destructive6.66:1AA
Dark mode
Text on background19.12:1AAA
Text on card19.33:1AAA
Primary button7.19:1AAA
Secondary button9.11:1AAA
Muted text6.41:1AA
Accent6.11:1AA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 316.586);
  --foreground: oklch(0.106 0.022 318.388);
  --muted: oklch(0.928 0.004 296.245);
  --muted-foreground: oklch(0.478 0.019 295.613);
  --popover: oklch(0.981 0.008 316.586);
  --popover-foreground: oklch(0.106 0.022 318.388);
  --card: oklch(0.972 0.012 316.574);
  --card-foreground: oklch(0.084 0.017 318.388);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.395 0.194 311.961);
  --primary-foreground: oklch(0.884 0.081 316.34);
  --secondary: oklch(0.314 0.192 275.31);
  --secondary-foreground: oklch(0.862 0.073 294.765);
  --accent: oklch(0.44 0.187 340.49);
  --accent-foreground: oklch(0.893 0.079 333.925);
  --destructive: oklch(0.377 0.146 30.498);
  --destructive-foreground: oklch(0.85 0.079 24.732);
  --ring: oklch(0.395 0.194 311.961);
  --chart-1: oklch(0.395 0.194 311.961);
  --chart-2: oklch(0.314 0.192 275.31);
  --chart-3: oklch(0.44 0.187 340.49);
  --chart-4: oklch(0.336 0.207 274.904);
  --chart-5: oklch(0.398 0.197 311.719);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.132 0.033 317.136);
  --foreground: oklch(0.982 0.006 316.591);
  --muted: oklch(0.199 0.006 295.741);
  --muted-foreground: oklch(0.686 0.017 295.876);
  --popover: oklch(0.132 0.033 317.136);
  --popover-foreground: oklch(0.982 0.006 316.591);
  --card: oklch(0.144 0.038 316.408);
  --card-foreground: oklch(0.991 0.003 316.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.395 0.194 311.961);
  --primary-foreground: oklch(0.884 0.081 316.34);
  --secondary: oklch(0.314 0.192 275.31);
  --secondary-foreground: oklch(0.862 0.073 294.765);
  --accent: oklch(0.44 0.187 340.49);
  --accent-foreground: oklch(0.893 0.079 333.925);
  --destructive: oklch(0.645 0.23 29.853);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.395 0.194 311.961);
  --chart-1: oklch(0.395 0.194 311.961);
  --chart-2: oklch(0.314 0.192 275.31);
  --chart-3: oklch(0.44 0.187 340.49);
  --chart-4: oklch(0.336 0.207 274.904);
  --chart-5: oklch(0.398 0.197 311.719);
}