Commerce for shadcn/ui

Commerce is a shadcn/ui theme built around a purple primary color (#e467c5) with muted light red accents (#c9c0c0). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#e467c5) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#fdfcfdwhite
Card
#ffffffwhite
#000000black
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#e467c5orchid
#e467c5orchid
Primary foreground
#160411black
#160411black
Secondary
#d6d6d6lightgrey
#1a191ablack
Secondary foreground
#3d3d3ddarkslategray
#b5b0b4darkgray
Muted
#f6eaealinen
#150912black
Muted foreground
#574c4cdarkslategray
#b3a8b0darkgray
Accent
#c9c0c0silver
#362b33darkslategray
Accent foreground
#2f2828darkslategray
#d0c3cdthistle
Destructive
#a31f05firebrick
#f84420orangered
Destructive foreground
#fee2dcmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e467c5orchid
#e467c5orchid

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.66:1AA
Secondary button7.48:1AAA
Muted text7.01:1AAA
Accent8.07:1AAA
Destructive6.19:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button6.66:1AA
Secondary button8.22:1AAA
Muted text8.45:1AAA
Accent7.99:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.946 0.013 17.38);
  --muted-foreground: oklch(0.428 0.015 17.768);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.696 0.188 338.107);
  --primary-foreground: oklch(0.148 0.043 337.379);
  --secondary: oklch(0.877 0 180);
  --secondary-foreground: oklch(0.361 0 180);
  --accent: oklch(0.814 0.011 17.374);
  --accent-foreground: oklch(0.284 0.01 17.776);
  --destructive: oklch(0.465 0.17 32.39);
  --destructive-foreground: oklch(0.934 0.032 31.144);
  --ring: oklch(0.696 0.188 338.107);
  --chart-1: oklch(0.696 0.188 338.107);
  --chart-2: oklch(0.877 0 180);
  --chart-3: oklch(0.814 0.011 17.374);
  --chart-4: oklch(0.9 0 188.746);
  --chart-5: oklch(0.697 0.195 338.272);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 333.89);
  --muted: oklch(0.163 0.026 336.376);
  --muted-foreground: oklch(0.743 0.018 334.275);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 333.89);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 333.89);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.696 0.188 338.107);
  --primary-foreground: oklch(0.148 0.043 337.379);
  --secondary: oklch(0.214 0.003 334.13);
  --secondary-foreground: oklch(0.763 0.007 334.033);
  --accent: oklch(0.304 0.023 335.078);
  --accent-foreground: oklch(0.831 0.019 334.266);
  --destructive: oklch(0.649 0.221 32.941);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.696 0.188 338.107);
  --chart-1: oklch(0.696 0.188 338.107);
  --chart-2: oklch(0.214 0.003 334.13);
  --chart-3: oklch(0.304 0.023 335.078);
  --chart-4: oklch(0.247 0.004 334.152);
  --chart-5: oklch(0.697 0.195 338.272);
}