Sarcastic for shadcn/ui

Sarcastic is a shadcn/ui theme built around a muted purple primary color (#93588a) with muted pink accents (#93586d). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the muted purple primary (#93588a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fbsnow
#000000black
Foreground
#040104black
#f9f5f9whitesmoke
Card
#fbf4faghostwhite
#030303black
Card foreground
#000000black
#fbf9fbsnow
Popover
#fbf4faghostwhite
#030303black
Popover foreground
#000000black
#fbf9fbsnow
Primary
#93588agray
#93588agray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7e5893slategray
#7e5893slategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ede3f2lavender
#170d1cblack
Muted foreground
#504a54darkslategray
#b1abb5darkgray
Accent
#93586ddimgray
#93586ddimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#841401maroon
#fe3816orangered
Destructive foreground
#ffc3b8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#93588agray
#93588agray

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.41:1AAA
Primary button5.25:1AA
Secondary button5.67:1AA
Muted text6.89:1AA
Accent5.45:1AA
Destructive6.60:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.73:1AAA
Primary button5.25:1AA
Secondary button5.67:1AA
Muted text8.44:1AAA
Accent5.45:1AA
Destructive3.62:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.007 330.335);
  --foreground: oklch(0.084 0.024 331.642);
  --muted: oklch(0.928 0.023 314.085);
  --muted-foreground: oklch(0.42 0.017 313.992);
  --popover: oklch(0.974 0.01 330.381);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.01 330.381);
  --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.544 0.103 332.498);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.099 313.117);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.533 0.082 357.747);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.396 0.148 32.25);
  --destructive-foreground: oklch(0.867 0.071 29.984);
  --ring: oklch(0.544 0.103 332.498);
  --chart-1: oklch(0.544 0.103 332.498);
  --chart-2: oklch(0.524 0.099 313.117);
  --chart-3: oklch(0.533 0.082 357.747);
  --chart-4: oklch(0.548 0.105 313.108);
  --chart-5: oklch(0.543 0.114 332.743);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.006 330.324);
  --muted: oklch(0.18 0.033 313.141);
  --muted-foreground: oklch(0.75 0.015 314.109);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.984 0.004 330.298);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.984 0.004 330.298);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.544 0.103 332.498);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.099 313.117);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.533 0.082 357.747);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.235 31.988);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.544 0.103 332.498);
  --chart-1: oklch(0.544 0.103 332.498);
  --chart-2: oklch(0.524 0.099 313.117);
  --chart-3: oklch(0.533 0.082 357.747);
  --chart-4: oklch(0.548 0.105 313.108);
  --chart-5: oklch(0.543 0.114 332.743);
}