Velvety for shadcn/ui

Velvety is a shadcn/ui theme built around a neutral gray primary color (#454545) with muted light red accents (#d5b9b9). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#454545) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfbsnow
#000000black
Foreground
#000000black
#f9f6f6whitesmoke
Card
#fefbfbsnow
#000000black
Card foreground
#000000black
#f9f6f6whitesmoke
Popover
#fefbfbsnow
#000000black
Popover foreground
#000000black
#f9f6f6whitesmoke
Primary
#454545darkslategray
#454545darkslategray
Primary foreground
#dededegainsboro
#dededegainsboro
Secondary
#e1d6d6gainsboro
#2c2121black
Secondary foreground
#4d3838darkslategray
#c9b6b6silver
Muted
#dbd6d6gainsboro
#292424darkslategray
Muted foreground
#473e3edarkslategray
#c1b8b8silver
Accent
#d5b9b9silver
#462b2bdarkslategray
Accent foreground
#392222darkslategray
#dcc6c6thistle
Destructive
#cf290cfirebrick
#f34d30tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#454545darkslategray
#454545darkslategray

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card20.36:1AAA
Primary button7.14:1AAA
Secondary button7.60:1AAA
Muted text7.23:1AAA
Accent8.03:1AAA
Destructive5.26:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button7.14:1AAA
Secondary button8.09:1AAA
Muted text7.89:1AAA
Accent7.92:1AAA
Destructive3.55:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 17.222);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.881 0.005 17.253);
  --muted-foreground: oklch(0.372 0.013 17.746);
  --popover: oklch(0.99 0.004 17.222);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.004 17.222);
  --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.39 0 165.964);
  --primary-foreground: oklch(0.9 0 188.746);
  --secondary: oklch(0.884 0.013 17.395);
  --secondary-foreground: oklch(0.363 0.03 18.655);
  --accent: oklch(0.809 0.032 17.837);
  --accent-foreground: oklch(0.283 0.035 19.509);
  --destructive: oklch(0.554 0.204 31.856);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.39 0 165.964);
  --chart-1: oklch(0.39 0 165.964);
  --chart-2: oklch(0.884 0.013 17.395);
  --chart-3: oklch(0.809 0.032 17.837);
  --chart-4: oklch(0.909 0.01 17.337);
  --chart-5: oklch(0.386 0.006 17.4);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.003 17.216);
  --muted: oklch(0.265 0.007 17.596);
  --muted-foreground: oklch(0.79 0.011 17.379);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.975 0.003 17.216);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.975 0.003 17.216);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.39 0 165.964);
  --primary-foreground: oklch(0.9 0 188.746);
  --secondary: oklch(0.259 0.018 18.364);
  --secondary-foreground: oklch(0.791 0.022 17.625);
  --accent: oklch(0.321 0.04 19.517);
  --accent-foreground: oklch(0.845 0.025 17.655);
  --destructive: oklch(0.65 0.207 32.382);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.39 0 165.964);
  --chart-1: oklch(0.39 0 165.964);
  --chart-2: oklch(0.259 0.018 18.364);
  --chart-3: oklch(0.321 0.04 19.517);
  --chart-4: oklch(0.289 0.021 18.429);
  --chart-5: oklch(0.386 0.006 17.4);
}