Platelet for shadcn/ui

Platelet is a shadcn/ui theme built around a red primary color (#763737) with neutral gray accents (#e7e4e4). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the red primary (#763737) on a neutral background (#070303).

Color palette

TokenLightDark
Background
#fcf8f8snow
#070303black
Foreground
#0d0202black
#f9f6f6whitesmoke
Card
#fcf8f8snow
#070303black
Card foreground
#0d0202black
#f9f6f6whitesmoke
Popover
#fcf8f8snow
#070303black
Popover foreground
#0d0202black
#f9f6f6whitesmoke
Primary
#763737saddlebrown
#763737saddlebrown
Primary foreground
#f5eaealinen
#f5eaealinen
Secondary
#e7e4e4gainsboro
#261c1cblack
Secondary foreground
#524747darkslategray
#c4b0b0silver
Muted
#f3e8e8linen
#170c0cblack
Muted foreground
#614848darkolivegreen
#b79e9edarkgray
Accent
#e7e4e4gainsboro
#261c1cblack
Accent foreground
#524747darkslategray
#c4b0b0silver
Destructive
#732802saddlebrown
#fa5a0aorangered
Destructive foreground
#fdc6aanavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#763737saddlebrown
#763737saddlebrown

Contrast

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

Light mode
Text on background19.40:1AAA
Text on card19.40:1AAA
Primary button7.49:1AAA
Secondary button7.05:1AAA
Muted text6.90:1AA
Accent7.05:1AAA
Destructive6.81:1AA
Dark mode
Text on background19.07:1AAA
Text on card19.07:1AAA
Primary button7.49:1AAA
Secondary button8.03:1AAA
Muted text7.65:1AAA
Accent8.03:1AAA
Destructive6.53:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 17.222);
  --foreground: oklch(0.114 0.029 22.864);
  --muted: oklch(0.939 0.012 17.371);
  --muted-foreground: oklch(0.427 0.035 18.608);
  --popover: oklch(0.982 0.004 17.222);
  --popover-foreground: oklch(0.114 0.029 22.864);
  --card: oklch(0.982 0.004 17.222);
  --card-foreground: oklch(0.114 0.029 22.864);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.421 0.088 21.52);
  --primary-foreground: oklch(0.946 0.012 17.368);
  --secondary: oklch(0.921 0.004 17.228);
  --secondary-foreground: oklch(0.409 0.015 17.762);
  --accent: oklch(0.921 0.004 17.228);
  --accent-foreground: oklch(0.409 0.015 17.762);
  --destructive: oklch(0.384 0.114 41.69);
  --destructive-foreground: oklch(0.868 0.074 47.85);
  --ring: oklch(0.421 0.088 21.52);
  --chart-1: oklch(0.421 0.088 21.52);
  --chart-2: oklch(0.921 0.004 17.228);
  --chart-3: oklch(0.921 0.004 17.228);
  --chart-4: oklch(0.945 0.003 17.205);
  --chart-5: oklch(0.42 0.095 22.002);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.011 18.982);
  --foreground: oklch(0.975 0.003 17.213);
  --muted: oklch(0.172 0.019 19.24);
  --muted-foreground: oklch(0.722 0.03 17.864);
  --popover: oklch(0.108 0.011 18.982);
  --popover-foreground: oklch(0.975 0.003 17.213);
  --card: oklch(0.108 0.011 18.982);
  --card-foreground: oklch(0.975 0.003 17.213);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.421 0.088 21.52);
  --primary-foreground: oklch(0.946 0.012 17.368);
  --secondary: oklch(0.239 0.016 18.309);
  --secondary-foreground: oklch(0.774 0.024 17.679);
  --accent: oklch(0.239 0.016 18.309);
  --accent-foreground: oklch(0.774 0.024 17.679);
  --destructive: oklch(0.674 0.208 40.044);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.421 0.088 21.52);
  --chart-1: oklch(0.421 0.088 21.52);
  --chart-2: oklch(0.239 0.016 18.309);
  --chart-3: oklch(0.239 0.016 18.309);
  --chart-4: oklch(0.269 0.019 18.387);
  --chart-5: oklch(0.42 0.095 22.002);
}