Rhubarb for shadcn/ui

Rhubarb is a shadcn/ui theme built around a deep purple primary color (#20091b) with deep pink accents (#200910). The light mode uses a neutral background (#fefbfd). Dark mode keeps the deep purple primary (#20091b) on a neutral background (#040203).

Color palette

TokenLightDark
Background
#fefbfdsnow
#040203black
Foreground
#000000black
#fcf8fbsnow
Card
#fdf7fcsnow
#070306black
Card foreground
#000000black
#fdfbfdsnow
Popover
#fdf7fcsnow
#070306black
Popover foreground
#000000black
#fdfbfdsnow
Primary
#20091bblack
#20091bblack
Primary foreground
#db80c9orchid
#db80c9orchid
Secondary
#190920black
#190920black
Secondary foreground
#c080dborchid
#c080dborchid
Muted
#efeaf1whitesmoke
#130e15black
Muted foreground
#665d69dimgray
#9e96a2darkgray
Accent
#200910black
#200910black
Accent foreground
#db809bpalevioletred
#db809bpalevioletred
Destructive
#7e1d02maroon
#fb410eorangered
Destructive foreground
#fec4b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#20091bblack
#20091bblack

Contrast

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

Light mode
Text on background20.43:1AAA
Text on card19.87:1AAA
Primary button7.11:1AAA
Secondary button6.67:1AA
Muted text5.29:1AA
Accent6.83:1AA
Destructive6.70:1AA
Dark mode
Text on background19.70:1AAA
Text on card19.88:1AAA
Primary button7.11:1AAA
Secondary button6.67:1AA
Muted text6.64:1AA
Accent6.83:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 332.069);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.942 0.011 315.98);
  --muted-foreground: oklch(0.492 0.021 315.867);
  --popover: oklch(0.982 0.009 332.134);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.009 332.134);
  --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.186 0.049 335.634);
  --primary-foreground: oklch(0.721 0.145 334.752);
  --secondary: oklch(0.177 0.05 314.781);
  --secondary-foreground: oklch(0.698 0.145 315.194);
  --accent: oklch(0.18 0.041 3.064);
  --accent-foreground: oklch(0.705 0.117 1.238);
  --destructive: oklch(0.39 0.136 34.778);
  --destructive-foreground: oklch(0.867 0.071 36);
  --ring: oklch(0.186 0.049 335.634);
  --chart-1: oklch(0.186 0.049 335.634);
  --chart-2: oklch(0.177 0.05 314.781);
  --chart-3: oklch(0.18 0.041 3.064);
  --chart-4: oklch(0.208 0.065 314.526);
  --chart-5: oklch(0.186 0.052 335.796);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.013 332.634);
  --foreground: oklch(0.983 0.006 332.095);
  --muted: oklch(0.175 0.016 315.683);
  --muted-foreground: oklch(0.683 0.02 315.919);
  --popover: oklch(0.11 0.016 332.634);
  --popover-foreground: oklch(0.991 0.003 332.05);
  --card: oklch(0.11 0.016 332.634);
  --card-foreground: oklch(0.991 0.003 332.05);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.186 0.049 335.634);
  --primary-foreground: oklch(0.721 0.145 334.752);
  --secondary: oklch(0.177 0.05 314.781);
  --secondary-foreground: oklch(0.698 0.145 315.194);
  --accent: oklch(0.18 0.041 3.064);
  --accent-foreground: oklch(0.705 0.117 1.238);
  --destructive: oklch(0.651 0.228 34.138);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.186 0.049 335.634);
  --chart-1: oklch(0.186 0.049 335.634);
  --chart-2: oklch(0.177 0.05 314.781);
  --chart-3: oklch(0.18 0.041 3.064);
  --chart-4: oklch(0.208 0.065 314.526);
  --chart-5: oklch(0.186 0.052 335.796);
}