Sarcastic for shadcn/ui

Sarcastic is a shadcn/ui theme built around a near-white primary color (#fef6f5) with near-white accents (#fefbf5). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#fef6f5) on a red-tinted background (#0c0403).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c0403black
Foreground
#090201black
#ffffffwhite
Card
#ffffffwhite
#0c0403black
Card foreground
#090201black
#ffffffwhite
Popover
#ffffffwhite
#0c0403black
Popover foreground
#090201black
#ffffffwhite
Primary
#fef6f5lavenderblush
#fef6f5lavenderblush
Primary foreground
#b5200dfirebrick
#b5200dfirebrick
Secondary
#fef5f9snow
#fef5f9snow
Secondary foreground
#b50d4dcrimson
#b50d4dcrimson
Muted
#ded3d7gainsboro
#2c2125darkslategray
Muted foreground
#6a5c62dimgray
#a3959adarkgray
Accent
#fefbf5floralwhite
#fefbf5floralwhite
Accent foreground
#563706saddlebrown
#563706saddlebrown
Destructive
#c12710firebrick
#ec3013orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fef6f5lavenderblush
#fef6f5lavenderblush

Contrast

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

Light mode
Text on background20.57:1AAA
Text on card20.57:1AAA
Primary button6.23:1AA
Secondary button6.29:1AA
Muted text4.34:1AA Large
Accent10.45:1AAA
Destructive5.86:1AA
Dark mode
Text on background20.28:1AAA
Text on card20.28:1AAA
Primary button6.23:1AA
Secondary button6.29:1AA
Muted text5.44:1AA
Accent10.45:1AAA
Destructive4.20:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.104 0.023 35.757);
  --muted: oklch(0.877 0.014 352.041);
  --muted-foreground: oklch(0.492 0.02 352.704);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.104 0.023 35.757);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.104 0.023 35.757);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.98 0.009 26.499);
  --primary-foreground: oklch(0.5 0.186 30.966);
  --secondary: oklch(0.979 0.01 351.895);
  --secondary-foreground: oklch(0.5 0.194 8.187);
  --accent: oklch(0.989 0.008 79.919);
  --accent-foreground: oklch(0.365 0.074 72.64);
  --destructive: oklch(0.528 0.192 31.505);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.98 0.009 26.499);
  --chart-1: oklch(0.98 0.009 26.499);
  --chart-2: oklch(0.979 0.01 351.895);
  --chart-3: oklch(0.989 0.008 79.919);
  --chart-4: oklch(1.01 0.005 171.444);
  --chart-5: oklch(0.98 0.009 26.501);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.019 32.233);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.261 0.019 353.593);
  --muted-foreground: oklch(0.682 0.018 352.334);
  --popover: oklch(0.123 0.019 32.233);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.019 32.233);
  --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.98 0.009 26.499);
  --primary-foreground: oklch(0.5 0.186 30.966);
  --secondary: oklch(0.979 0.01 351.895);
  --secondary-foreground: oklch(0.5 0.194 8.187);
  --accent: oklch(0.989 0.008 79.919);
  --accent-foreground: oklch(0.365 0.074 72.64);
  --destructive: oklch(0.611 0.225 31.447);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.98 0.009 26.499);
  --chart-1: oklch(0.98 0.009 26.499);
  --chart-2: oklch(0.979 0.01 351.895);
  --chart-3: oklch(0.989 0.008 79.919);
  --chart-4: oklch(1.01 0.005 171.444);
  --chart-5: oklch(0.98 0.009 26.501);
}