Variety for shadcn/ui

Variety is a shadcn/ui theme built around a vivid light violet primary color (#c497f7) with muted light violet accents (#e5e2e9). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the vivid light violet primary (#c497f7) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#fcfbfewhite
#050307black
Foreground
#020104black
#f7f6f9whitesmoke
Card
#faf7fdghostwhite
#07050bblack
Card foreground
#000000black
#faf9fbghostwhite
Popover
#faf7fdghostwhite
#07050bblack
Popover foreground
#000000black
#faf9fbghostwhite
Primary
#c497f7plum
#c497f7plum
Primary foreground
#2b0755midnightblue
#2b0755midnightblue
Secondary
#e5e2e9gainsboro
#231e2ablack
Secondary foreground
#4c4356darkslategray
#bcb1c8silver
Muted
#e0dce5gainsboro
#1e1a23black
Muted foreground
#545158dimgray
#aba7aedarkgray
Accent
#e5e2e9gainsboro
#231e2ablack
Accent foreground
#4c4356darkslategray
#bcb1c8silver
Destructive
#aa130efirebrick
#ed2d26crimson
Destructive foreground
#fdedeclinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c497f7plum
#c497f7plum

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card19.80:1AAA
Primary button7.21:1AAA
Secondary button7.32:1AAA
Muted text5.74:1AA
Accent7.32:1AAA
Destructive6.59:1AA
Dark mode
Text on background19.06:1AAA
Text on card19.33:1AAA
Primary button7.21:1AAA
Secondary button7.96:1AAA
Muted text7.23:1AAA
Accent7.96:1AAA
Destructive4.18:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 307.067);
  --foreground: oklch(0.077 0.023 309.074);
  --muted: oklch(0.899 0.014 306.92);
  --muted-foreground: oklch(0.44 0.012 306.79);
  --popover: oklch(0.98 0.007 307.02);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.007 307.02);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.754 0.14 304.738);
  --primary-foreground: oklch(0.253 0.125 297.151);
  --secondary: oklch(0.918 0.009 306.995);
  --secondary-foreground: oklch(0.4 0.032 306.124);
  --accent: oklch(0.918 0.009 306.995);
  --accent-foreground: oklch(0.4 0.032 306.124);
  --destructive: oklch(0.47 0.183 28.963);
  --destructive-foreground: oklch(0.958 0.018 19.877);
  --ring: oklch(0.754 0.14 304.738);
  --chart-1: oklch(0.754 0.14 304.738);
  --chart-2: oklch(0.918 0.009 306.995);
  --chart-3: oklch(0.918 0.009 306.995);
  --chart-4: oklch(0.943 0.006 307.033);
  --chart-5: oklch(0.752 0.145 304.639);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.014 308.014);
  --foreground: oklch(0.975 0.004 307.06);
  --muted: oklch(0.226 0.02 306.038);
  --muted-foreground: oklch(0.735 0.01 306.942);
  --popover: oklch(0.122 0.017 307.994);
  --popover-foreground: oklch(0.983 0.003 307.078);
  --card: oklch(0.122 0.017 307.994);
  --card-foreground: oklch(0.983 0.003 307.078);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.754 0.14 304.738);
  --primary-foreground: oklch(0.253 0.125 297.151);
  --secondary: oklch(0.245 0.024 305.908);
  --secondary-foreground: oklch(0.778 0.034 306.584);
  --accent: oklch(0.245 0.024 305.908);
  --accent-foreground: oklch(0.778 0.034 306.584);
  --destructive: oklch(0.613 0.227 28.379);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.754 0.14 304.738);
  --chart-1: oklch(0.754 0.14 304.738);
  --chart-2: oklch(0.245 0.024 305.908);
  --chart-3: oklch(0.245 0.024 305.908);
  --chart-4: oklch(0.274 0.028 305.84);
  --chart-5: oklch(0.752 0.145 304.639);
}