Cruel for shadcn/ui

Cruel is a shadcn/ui theme built around a deep blue primary color (#081d35) with deep green accents (#1d3508). The light mode uses a neutral background (#f8fafc). Dark mode keeps the deep blue primary (#081d35) on a blue-tinted background (#060a0f).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#060a0fblack
Foreground
#03070cblack
#fcfcfdwhite
Card
#f5f7fawhitesmoke
#070c12black
Card foreground
#020508black
#ffffffwhite
Popover
#f8fafcghostwhite
#060a0fblack
Popover foreground
#03070cblack
#fcfcfdwhite
Primary
#081d35black
#081d35black
Primary foreground
#83b4ecskyblue
#83b4ecskyblue
Secondary
#35081dblack
#35081dblack
Secondary foreground
#ec83b4hotpink
#ec83b4hotpink
Muted
#dbd6d9gainsboro
#292426darkslategray
Muted foreground
#6e5e65dimgray
#a19198rosybrown
Accent
#1d3508darkgreen
#1d3508darkgreen
Accent foreground
#7fde2byellowgreen
#7fde2byellowgreen
Destructive
#ca3a16firebrick
#e74e27chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#081d35black
#081d35black

Contrast

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

Light mode
Text on background19.28:1AAA
Text on card19.04:1AAA
Primary button7.83:1AAA
Secondary button7.03:1AAA
Muted text4.24:1AA Large
Accent7.91:1AAA
Destructive5.07:1AA
Dark mode
Text on background19.37:1AAA
Text on card19.57:1AAA
Primary button7.83:1AAA
Secondary button7.03:1AAA
Muted text5.12:1AA
Accent7.91:1AAA
Destructive3.81:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 251.475);
  --foreground: oklch(0.127 0.014 244.02);
  --muted: oklch(0.881 0.007 347.113);
  --muted-foreground: oklch(0.5 0.024 348.157);
  --popover: oklch(0.984 0.003 251.475);
  --popover-foreground: oklch(0.127 0.014 244.02);
  --card: oklch(0.976 0.005 251.488);
  --card-foreground: oklch(0.111 0.012 243.514);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.229 0.054 253.632);
  --primary-foreground: oklch(0.757 0.096 252.356);
  --secondary: oklch(0.227 0.074 356.239);
  --secondary-foreground: oklch(0.739 0.139 351.646);
  --accent: oklch(0.298 0.075 133.599);
  --accent-foreground: oklch(0.81 0.22 134.53);
  --destructive: oklch(0.56 0.186 34.356);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.229 0.054 253.632);
  --chart-1: oklch(0.229 0.054 253.632);
  --chart-2: oklch(0.227 0.074 356.239);
  --chart-3: oklch(0.298 0.075 133.599);
  --chart-4: oklch(0.259 0.088 356.985);
  --chart-5: oklch(0.229 0.056 253.698);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.013 248.268);
  --foreground: oklch(0.992 0.001 251.46);
  --muted: oklch(0.265 0.009 347.817);
  --muted-foreground: oklch(0.673 0.022 347.775);
  --popover: oklch(0.142 0.013 248.268);
  --popover-foreground: oklch(0.992 0.001 251.46);
  --card: oklch(0.154 0.015 250.958);
  --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.229 0.054 253.632);
  --primary-foreground: oklch(0.757 0.096 252.356);
  --secondary: oklch(0.227 0.074 356.239);
  --secondary-foreground: oklch(0.739 0.139 351.646);
  --accent: oklch(0.298 0.075 133.599);
  --accent-foreground: oklch(0.81 0.22 134.53);
  --destructive: oklch(0.631 0.196 34.804);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.229 0.054 253.632);
  --chart-1: oklch(0.229 0.054 253.632);
  --chart-2: oklch(0.227 0.074 356.239);
  --chart-3: oklch(0.298 0.075 133.599);
  --chart-4: oklch(0.259 0.088 356.985);
  --chart-5: oklch(0.229 0.056 253.698);
}