Avaricious for shadcn/ui

Avaricious is a shadcn/ui theme built around a neutral gray primary color (#59585a) with muted light violet accents (#cec9d9). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#59585a) on a violet-tinted background (#07040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#07040bblack
Foreground
#080311black
#fcfcfdwhite
Card
#ffffffwhite
#07040bblack
Card foreground
#080311black
#fcfcfdwhite
Popover
#ffffffwhite
#07040bblack
Popover foreground
#080311black
#fcfcfdwhite
Primary
#59585adimgray
#59585adimgray
Primary foreground
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Secondary
#cec9d9lightgrey
#2c2834darkslategray
Secondary foreground
#352f42darkslategray
#c4c0cesilver
Muted
#dad7dfgainsboro
#222028black
Muted foreground
#474351darkslategray
#b3aebcdarkgray
Accent
#cec9d9lightgrey
#2c2834darkslategray
Accent foreground
#352f42darkslategray
#c4c0cesilver
Destructive
#97210cbrown
#ed4021orangered
Destructive foreground
#fcded9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#59585adimgray
#59585adimgray

Contrast

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

Light mode
Text on background20.35:1AAA
Text on card20.35:1AAA
Primary button6.29:1AA
Secondary button7.95:1AAA
Muted text6.76:1AA
Accent7.95:1AAA
Destructive6.53:1AA
Dark mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button6.29:1AA
Secondary button8.07:1AAA
Muted text7.43:1AAA
Accent8.07:1AAA
Destructive3.92:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.121 0.036 300.363);
  --muted: oklch(0.885 0.011 301.293);
  --muted-foreground: oklch(0.392 0.025 300.443);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.121 0.036 300.363);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.121 0.036 300.363);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.463 0.003 301.391);
  --primary-foreground: oklch(0.962 0 301.487);
  --secondary: oklch(0.846 0.022 301.072);
  --secondary-foreground: oklch(0.318 0.034 299.722);
  --accent: oklch(0.846 0.022 301.072);
  --accent-foreground: oklch(0.318 0.034 299.722);
  --destructive: oklch(0.444 0.157 32.171);
  --destructive-foreground: oklch(0.925 0.034 29.636);
  --ring: oklch(0.463 0.003 301.391);
  --chart-1: oklch(0.463 0.003 301.391);
  --chart-2: oklch(0.846 0.022 301.072);
  --chart-3: oklch(0.846 0.022 301.072);
  --chart-4: oklch(0.872 0.018 301.155);
  --chart-5: oklch(0.457 0.012 301.077);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.018 301.822);
  --foreground: oklch(0.991 0.003 301.451);
  --muted: oklch(0.249 0.015 300.511);
  --muted-foreground: oklch(0.758 0.022 301.035);
  --popover: oklch(0.119 0.018 301.822);
  --popover-foreground: oklch(0.991 0.003 301.451);
  --card: oklch(0.119 0.018 301.822);
  --card-foreground: oklch(0.991 0.003 301.451);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.463 0.003 301.391);
  --primary-foreground: oklch(0.962 0 301.487);
  --secondary: oklch(0.286 0.022 300.234);
  --secondary-foreground: oklch(0.815 0.021 301.081);
  --accent: oklch(0.286 0.022 300.234);
  --accent-foreground: oklch(0.815 0.021 301.081);
  --destructive: oklch(0.626 0.214 32.306);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.463 0.003 301.391);
  --chart-1: oklch(0.463 0.003 301.391);
  --chart-2: oklch(0.286 0.022 300.234);
  --chart-3: oklch(0.286 0.022 300.234);
  --chart-4: oklch(0.314 0.025 300.187);
  --chart-5: oklch(0.457 0.012 301.077);
}