Citrus for shadcn/ui

Citrus is a shadcn/ui theme built around a light indigo primary color (#a7a2f1) with light violet accents (#cfa2f1). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the light indigo primary (#a7a2f1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#000000black
Foreground
#020208black
#fcfcfdwhite
Card
#f3f2fcaliceblue
#030303black
Card foreground
#010104black
#ffffffwhite
Popover
#f3f2fcaliceblue
#030303black
Popover foreground
#010104black
#ffffffwhite
Primary
#a7a2f1lightsteelblue
#a7a2f1lightsteelblue
Primary foreground
#110d54midnightblue
#110d54midnightblue
Secondary
#a2c4f1lightsteelblue
#a2c4f1lightsteelblue
Secondary foreground
#0d2c54midnightblue
#0d2c54midnightblue
Muted
#e6e8ealavender
#151719black
Muted foreground
#494e55darkslategray
#aaafb6darkgray
Accent
#cfa2f1plum
#cfa2f1plum
Accent foreground
#350d54midnightblue
#350d54midnightblue
Destructive
#652206maroon
#f15613orangered
Destructive foreground
#fabda3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a7a2f1lightsteelblue
#a7a2f1lightsteelblue

Contrast

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

Light mode
Text on background19.35:1AAA
Text on card18.83:1AAA
Primary button7.50:1AAA
Secondary button7.78:1AAA
Muted text6.81:1AA
Accent7.53:1AAA
Destructive7.18:1AAA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button7.50:1AAA
Secondary button7.78:1AAA
Muted text8.16:1AAA
Accent7.53:1AAA
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.977 0.009 289.312);
  --foreground: oklch(0.093 0.023 285.597);
  --muted: oklch(0.93 0.004 254.975);
  --muted-foreground: oklch(0.422 0.014 255.107);
  --popover: oklch(0.966 0.013 289.224);
  --popover-foreground: oklch(0.074 0.018 285.597);
  --card: oklch(0.966 0.013 289.224);
  --card-foreground: oklch(0.074 0.018 285.597);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.746 0.113 286.364);
  --primary-foreground: oklch(0.231 0.122 274.205);
  --secondary: oklch(0.811 0.074 255.288);
  --secondary-foreground: oklch(0.294 0.082 256.616);
  --accent: oklch(0.781 0.12 309.727);
  --accent-foreground: oklch(0.272 0.12 305.131);
  --destructive: oklch(0.352 0.103 40.32);
  --destructive-foreground: oklch(0.848 0.078 44.261);
  --ring: oklch(0.746 0.113 286.364);
  --chart-1: oklch(0.746 0.113 286.364);
  --chart-2: oklch(0.811 0.074 255.288);
  --chart-3: oklch(0.781 0.12 309.727);
  --chart-4: oklch(0.838 0.063 255.243);
  --chart-5: oklch(0.743 0.118 286.205);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 289.449);
  --muted: oklch(0.202 0.005 255.083);
  --muted-foreground: oklch(0.752 0.012 255.035);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.746 0.113 286.364);
  --primary-foreground: oklch(0.231 0.122 274.205);
  --secondary: oklch(0.811 0.074 255.288);
  --secondary-foreground: oklch(0.294 0.082 256.616);
  --accent: oklch(0.781 0.12 309.727);
  --accent-foreground: oklch(0.272 0.12 305.131);
  --destructive: oklch(0.655 0.203 39.039);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.746 0.113 286.364);
  --chart-1: oklch(0.746 0.113 286.364);
  --chart-2: oklch(0.811 0.074 255.288);
  --chart-3: oklch(0.781 0.12 309.727);
  --chart-4: oklch(0.838 0.063 255.243);
  --chart-5: oklch(0.743 0.118 286.205);
}