Cruelty for shadcn/ui

Cruelty is a shadcn/ui theme built around a neutral gray primary color (#dbd6d8) with neutral gray accents (#d6dbda). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#dbd6d8) on a pink-tinted background (#0a0507).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0507black
Foreground
#110307black
#fbf9fasnow
Card
#ffffffwhite
#0a0507black
Card foreground
#110307black
#fbf9fasnow
Popover
#ffffffwhite
#0a0507black
Popover foreground
#110307black
#fbf9fasnow
Primary
#dbd6d8gainsboro
#dbd6d8gainsboro
Primary foreground
#443b3edarkslategray
#443b3edarkslategray
Secondary
#d6dbdagainsboro
#d6dbdagainsboro
Secondary foreground
#3b4442darkslategray
#3b4442darkslategray
Muted
#d1e0dcgainsboro
#1f2e29darkslategray
Muted foreground
#576b65dimgray
#94a8a2darkgray
Accent
#d6dbdagainsboro
#d6dbdagainsboro
Accent foreground
#3b4442darkslategray
#3b4442darkslategray
Destructive
#89260bsaddlebrown
#ec4213orangered
Destructive foreground
#fbd5cbbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dbd6d8gainsboro
#dbd6d8gainsboro

Contrast

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

Light mode
Text on background20.19:1AAA
Text on card20.19:1AAA
Primary button7.54:1AAA
Secondary button7.19:1AAA
Muted text4.18:1AA Large
Accent7.19:1AAA
Destructive6.59:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.29:1AAA
Primary button7.54:1AAA
Secondary button7.19:1AAA
Muted text5.66:1AA
Accent7.19:1AAA
Destructive3.92:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.132 0.031 358.29);
  --muted: oklch(0.895 0.018 176.079);
  --muted-foreground: oklch(0.509 0.025 175.145);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.132 0.031 358.29);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.132 0.031 358.29);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.881 0.006 356.862);
  --primary-foreground: oklch(0.364 0.013 357.678);
  --secondary: oklch(0.888 0.006 176.455);
  --secondary-foreground: oklch(0.378 0.013 175.66);
  --accent: oklch(0.888 0.006 176.455);
  --accent-foreground: oklch(0.378 0.013 175.66);
  --destructive: oklch(0.422 0.138 35.135);
  --destructive-foreground: oklch(0.903 0.044 35.947);
  --ring: oklch(0.881 0.006 356.862);
  --chart-1: oklch(0.881 0.006 356.862);
  --chart-2: oklch(0.888 0.006 176.455);
  --chart-3: oklch(0.888 0.006 176.455);
  --chart-4: oklch(0.911 0.005 176.5);
  --chart-5: oklch(0.88 0.009 356.95);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.012 356.504);
  --foreground: oklch(0.984 0.002 356.702);
  --muted: oklch(0.285 0.022 174.141);
  --muted-foreground: oklch(0.714 0.023 175.678);
  --popover: oklch(0.125 0.012 356.504);
  --popover-foreground: oklch(0.984 0.002 356.702);
  --card: oklch(0.125 0.012 356.504);
  --card-foreground: oklch(0.984 0.002 356.702);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.881 0.006 356.862);
  --primary-foreground: oklch(0.364 0.013 357.678);
  --secondary: oklch(0.888 0.006 176.455);
  --secondary-foreground: oklch(0.378 0.013 175.66);
  --accent: oklch(0.888 0.006 176.455);
  --accent-foreground: oklch(0.378 0.013 175.66);
  --destructive: oklch(0.626 0.213 34.626);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.881 0.006 356.862);
  --chart-1: oklch(0.881 0.006 356.862);
  --chart-2: oklch(0.888 0.006 176.455);
  --chart-3: oklch(0.888 0.006 176.455);
  --chart-4: oklch(0.911 0.005 176.5);
  --chart-5: oklch(0.88 0.009 356.95);
}