Cruelty for shadcn/ui

Cruelty is a shadcn/ui theme built around a vivid deep yellow primary color (#1c1a02) with muted light yellow accents (#deddd3). The light mode uses a neutral background (#fefefb). Dark mode keeps the vivid deep yellow primary (#1c1a02) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fefefbwhite
#070703black
Foreground
#000000black
#ffffffwhite
Card
#fdfcf7snow
#0b0a04black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfcf7snow
#0b0a04black
Popover foreground
#000000black
#ffffffwhite
Primary
#1c1a02black
#1c1a02black
Primary foreground
#d8c413goldenrod
#d8c413goldenrod
Secondary
#deddd3gainsboro
#2c2c2adarkslategray
Secondary foreground
#494737darkslategray
#c6c5c3silver
Muted
#e9e9e2beige
#1d1d16black
Muted foreground
#555449darkolivegreen
#b6b5aadarkgray
Accent
#deddd3gainsboro
#2c2c2adarkslategray
Accent foreground
#494737darkslategray
#c6c5c3silver
Destructive
#8a3c0fsaddlebrown
#d45c16chocolate
Destructive foreground
#fae0d1antiquewhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1c1a02black
#1c1a02black

Contrast

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

Light mode
Text on background20.71:1AAA
Text on card20.43:1AAA
Primary button9.89:1AAA
Secondary button6.87:1AA
Muted text6.24:1AA
Accent6.87:1AA
Destructive6.07:1AA
Dark mode
Text on background20.17:1AAA
Text on card19.78:1AAA
Primary button9.89:1AAA
Secondary button8.10:1AAA
Muted text8.23:1AAA
Accent8.10: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(0.995 0.003 101.337);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.931 0.009 101.443);
  --muted-foreground: oklch(0.444 0.018 101.902);
  --popover: oklch(0.99 0.006 101.388);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.006 101.388);
  --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.213 0.04 103.6);
  --primary-foreground: oklch(0.812 0.167 101.951);
  --secondary: oklch(0.896 0.013 101.515);
  --secondary-foreground: oklch(0.394 0.026 102.237);
  --accent: oklch(0.896 0.013 101.515);
  --accent-foreground: oklch(0.394 0.026 102.237);
  --destructive: oklch(0.455 0.12 45.534);
  --destructive-foreground: oklch(0.924 0.035 52.084);
  --ring: oklch(0.213 0.04 103.6);
  --chart-1: oklch(0.213 0.04 103.6);
  --chart-2: oklch(0.896 0.013 101.515);
  --chart-3: oklch(0.896 0.013 101.515);
  --chart-4: oklch(0.917 0.01 101.465);
  --chart-5: oklch(0.214 0.041 103.644);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.013 103.934);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.227 0.013 102.117);
  --muted-foreground: oklch(0.771 0.016 101.608);
  --popover: oklch(0.145 0.015 103.756);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.145 0.015 103.756);
  --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.213 0.04 103.6);
  --primary-foreground: oklch(0.812 0.167 101.951);
  --secondary: oklch(0.293 0.003 101.438);
  --secondary-foreground: oklch(0.824 0.003 101.343);
  --accent: oklch(0.293 0.003 101.438);
  --accent-foreground: oklch(0.824 0.003 101.343);
  --destructive: oklch(0.618 0.169 44.745);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.213 0.04 103.6);
  --chart-1: oklch(0.213 0.04 103.6);
  --chart-2: oklch(0.293 0.003 101.438);
  --chart-3: oklch(0.293 0.003 101.438);
  --chart-4: oklch(0.324 0.003 101.443);
  --chart-5: oklch(0.214 0.041 103.644);
}