Asphalt for shadcn/ui

Asphalt is a shadcn/ui theme built around a muted violet primary color (#887996) with muted green accents (#879679). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted violet primary (#887996) on a violet-tinted background (#08030c).

Color palette

TokenLightDark
Background
#fcfbfewhite
#08030cblack
Foreground
#0d0514black
#fcfcfdwhite
Card
#faf8fcghostwhite
#0a0410black
Card foreground
#0a0410black
#ffffffwhite
Popover
#fcfbfewhite
#08030cblack
Popover foreground
#0d0514black
#fcfcfdwhite
Primary
#887996lightslategray
#887996lightslategray
Primary foreground
#000000black
#000000black
Secondary
#879679gray
#879679gray
Secondary foreground
#000000black
#000000black
Muted
#e8ece4beige
#171b13black
Muted foreground
#404739darkslategray
#bfc6b8silver
Accent
#879679gray
#879679gray
Accent foreground
#000000black
#000000black
Destructive
#b42104firebrick
#e62a05orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#887996lightslategray
#887996lightslategray

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.13:1AAA
Primary button5.20:1AA
Secondary button6.63:1AA
Muted text8.05:1AAA
Accent6.63:1AA
Destructive6.64:1AA
Dark mode
Text on background19.88:1AAA
Text on card20.18:1AAA
Primary button5.20:1AA
Secondary button6.63:1AA
Muted text9.98:1AAA
Accent6.63:1AA
Destructive4.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 309.092);
  --foreground: oklch(0.139 0.036 307.536);
  --muted: oklch(0.938 0.011 129.253);
  --muted-foreground: oklch(0.386 0.025 129.835);
  --popover: oklch(0.991 0.003 309.092);
  --popover-foreground: oklch(0.139 0.036 307.536);
  --card: oklch(0.981 0.006 309.057);
  --card-foreground: oklch(0.128 0.032 308.955);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.599 0.046 308.315);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.652 0.045 129.883);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.652 0.045 129.883);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.498 0.185 32.209);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.599 0.046 308.315);
  --chart-1: oklch(0.599 0.046 308.315);
  --chart-2: oklch(0.652 0.045 129.883);
  --chart-3: oklch(0.652 0.045 129.883);
  --chart-4: oklch(0.675 0.042 129.802);
  --chart-5: oklch(0.593 0.058 308.099);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.117 0.026 310.505);
  --foreground: oklch(0.992 0.002 309.11);
  --muted: oklch(0.214 0.016 129.953);
  --muted-foreground: oklch(0.818 0.021 129.398);
  --popover: oklch(0.117 0.026 310.505);
  --popover-foreground: oklch(0.992 0.002 309.11);
  --card: oklch(0.13 0.029 308.939);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.599 0.046 308.315);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.652 0.045 129.883);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.652 0.045 129.883);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.596 0.224 31.923);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.599 0.046 308.315);
  --chart-1: oklch(0.599 0.046 308.315);
  --chart-2: oklch(0.652 0.045 129.883);
  --chart-3: oklch(0.652 0.045 129.883);
  --chart-4: oklch(0.675 0.042 129.802);
  --chart-5: oklch(0.593 0.058 308.099);
}