Writhing for shadcn/ui

Writhing is a shadcn/ui theme built around a deep yellow primary color (#333315) with muted light yellow accents (#d4d4c4). The light mode uses a neutral background (#fefefb). Dark mode keeps the deep yellow primary (#333315) on a yellow-tinted background (#0b0b04).

Color palette

TokenLightDark
Background
#fefefbwhite
#0b0b04black
Foreground
#000000black
#ffffffwhite
Card
#fdfdf7snow
#0f0f05black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfdf7snow
#0f0f05black
Popover foreground
#000000black
#ffffffwhite
Primary
#333315darkslategray
#333315darkslategray
Primary foreground
#bbbb58darkkhaki
#bbbb58darkkhaki
Secondary
#d4d4c4lightgrey
#242419black
Secondary foreground
#3b3b2bdarkslategray
#c4c4absilver
Muted
#f4f4eblinen
#14140bblack
Muted foreground
#52524cdarkslategray
#b3b3addarkgray
Accent
#d4d4c4lightgrey
#242419black
Accent foreground
#3b3b2bdarkslategray
#c4c4absilver
Destructive
#de2002red
#fd4326orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#333315darkslategray
#333315darkslategray

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.49:1AAA
Primary button6.40:1AA
Secondary button7.60:1AAA
Muted text7.11:1AAA
Accent7.60:1AAA
Destructive4.86:1AA
Dark mode
Text on background19.69:1AAA
Text on card19.22:1AAA
Primary button6.40:1AA
Secondary button8.83:1AAA
Muted text8.81:1AAA
Accent8.83:1AAA
Destructive3.50:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.003 106.463);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.965 0.011 106.61);
  --muted-foreground: oklch(0.437 0.01 106.812);
  --popover: oklch(0.991 0.007 106.526);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.991 0.007 106.526);
  --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.312 0.047 108.844);
  --primary-foreground: oklch(0.772 0.122 108.944);
  --secondary: oklch(0.866 0.022 106.851);
  --secondary-foreground: oklch(0.348 0.027 107.724);
  --accent: oklch(0.866 0.022 106.851);
  --accent-foreground: oklch(0.348 0.027 107.724);
  --destructive: oklch(0.576 0.223 31.02);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.312 0.047 108.844);
  --chart-1: oklch(0.312 0.047 108.844);
  --chart-2: oklch(0.866 0.022 106.851);
  --chart-3: oklch(0.866 0.022 106.851);
  --chart-4: oklch(0.886 0.019 106.774);
  --chart-5: oklch(0.316 0.05 108.937);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.018 108.416);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.186 0.016 107.893);
  --muted-foreground: oklch(0.765 0.009 106.607);
  --popover: oklch(0.166 0.021 108.471);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.166 0.021 108.471);
  --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.312 0.047 108.844);
  --primary-foreground: oklch(0.772 0.122 108.944);
  --secondary: oklch(0.256 0.019 107.646);
  --secondary-foreground: oklch(0.813 0.033 107.114);
  --accent: oklch(0.256 0.019 107.646);
  --accent-foreground: oklch(0.813 0.033 107.114);
  --destructive: oklch(0.656 0.226 31.656);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.312 0.047 108.844);
  --chart-1: oklch(0.312 0.047 108.844);
  --chart-2: oklch(0.256 0.019 107.646);
  --chart-3: oklch(0.256 0.019 107.646);
  --chart-4: oklch(0.292 0.022 107.714);
  --chart-5: oklch(0.316 0.05 108.937);
}