Vice for shadcn/ui

Vice is a shadcn/ui theme built around a light violet primary color (#f2eefc) with muted light violet accents (#c7c4cf). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the light violet primary (#f2eefc) on a neutral background (#020204).

Color palette

TokenLightDark
Background
#fcfbfewhite
#020204black
Foreground
#06030cblack
#f7f6f9whitesmoke
Card
#f9f8fcghostwhite
#040307black
Card foreground
#040208black
#f9f9fbghostwhite
Popover
#f9f8fcghostwhite
#040307black
Popover foreground
#040208black
#f9f9fbghostwhite
Primary
#f2eefcwhitesmoke
#f2eefcwhitesmoke
Primary foreground
#401c9cdarkslateblue
#401c9cdarkslateblue
Secondary
#dedddfgainsboro
#19181bblack
Secondary foreground
#444346darkslategray
#b1afb6darkgray
Muted
#d6d0e7gainsboro
#1f182fblack
Muted foreground
#595661dimgray
#a19ea9darkgray
Accent
#c7c4cfsilver
#302d39darkslategray
Accent foreground
#2e2b36darkslategray
#c9c6d2lightgrey
Destructive
#8b3104saddlebrown
#f9722ftomato
Destructive foreground
#fdd7c4peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f2eefcwhitesmoke
#f2eefcwhitesmoke

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.49:1AAA
Primary button9.84:1AAA
Secondary button7.25:1AAA
Muted text4.79:1AA
Accent8.04:1AAA
Destructive6.20:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.54:1AAA
Primary button9.84:1AAA
Secondary button8.12:1AAA
Muted text6.47:1AA
Accent8.00:1AAA
Destructive7.47:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 299.254);
  --foreground: oklch(0.113 0.025 299.159);
  --muted: oklch(0.869 0.032 298.672);
  --muted-foreground: oklch(0.461 0.018 298.631);
  --popover: oklch(0.981 0.006 299.203);
  --popover-foreground: oklch(0.099 0.021 299.348);
  --card: oklch(0.981 0.006 299.203);
  --card-foreground: oklch(0.099 0.021 299.348);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.955 0.019 298.954);
  --primary-foreground: oklch(0.373 0.188 285.82);
  --secondary: oklch(0.899 0.002 299.269);
  --secondary-foreground: oklch(0.386 0.005 299.095);
  --accent: oklch(0.825 0.017 298.958);
  --accent-foreground: oklch(0.297 0.019 298.169);
  --destructive: oklch(0.438 0.131 41.168);
  --destructive-foreground: oklch(0.906 0.05 48.144);
  --ring: oklch(0.955 0.019 298.954);
  --chart-1: oklch(0.955 0.019 298.954);
  --chart-2: oklch(0.899 0.002 299.269);
  --chart-3: oklch(0.825 0.017 298.958);
  --chart-4: oklch(0.922 0.001 299.278);
  --chart-5: oklch(0.955 0.02 298.939);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.012 299.333);
  --foreground: oklch(0.974 0.004 299.228);
  --muted: oklch(0.23 0.044 295.802);
  --muted-foreground: oklch(0.704 0.016 298.909);
  --popover: oklch(0.104 0.015 299.333);
  --popover-foreground: oklch(0.983 0.003 299.254);
  --card: oklch(0.104 0.015 299.333);
  --card-foreground: oklch(0.983 0.003 299.254);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.955 0.019 298.954);
  --primary-foreground: oklch(0.373 0.188 285.82);
  --secondary: oklch(0.213 0.004 298.977);
  --secondary-foreground: oklch(0.759 0.009 299.105);
  --accent: oklch(0.305 0.022 298.042);
  --accent-foreground: oklch(0.833 0.017 298.948);
  --destructive: oklch(0.705 0.182 43.913);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.955 0.019 298.954);
  --chart-1: oklch(0.955 0.019 298.954);
  --chart-2: oklch(0.213 0.004 298.977);
  --chart-3: oklch(0.305 0.022 298.042);
  --chart-4: oklch(0.245 0.005 298.948);
  --chart-5: oklch(0.955 0.02 298.939);
}