Controller for shadcn/ui

Controller is a shadcn/ui theme built around a purple primary color (#6d2c63) with green accents (#2c6d36). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#6d2c63) on a purple-tinted background (#0e060d).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e060dblack
Foreground
#080207black
#fdfcfdwhite
Card
#fcfcfcsnow
#120710black
Card foreground
#040104black
#ffffffwhite
Popover
#fcfcfcsnow
#120710black
Popover foreground
#040104black
#ffffffwhite
Primary
#6d2c63rebeccapurple
#6d2c63rebeccapurple
Primary foreground
#f0dbedlavender
#f0dbedlavender
Secondary
#2c6d36forestgreen
#2c6d36forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#c9e8celightgrey
#17361cdarkgreen
Muted foreground
#3c493edarkslategray
#b6c3b8silver
Accent
#2c6d36forestgreen
#2c6d36forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b44913sienna
#eb7a42coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6d2c63rebeccapurple
#6d2c63rebeccapurple

Contrast

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

Light mode
Text on background20.54:1AAA
Text on card20.31:1AAA
Primary button7.32:1AAA
Secondary button6.29:1AA
Muted text7.19:1AAA
Accent6.29:1AA
Destructive5.39:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.70:1AAA
Primary button7.32:1AAA
Secondary button6.29:1AA
Muted text7.30:1AAA
Accent6.29:1AA
Destructive7.40:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.108 0.025 331.379);
  --muted: oklch(0.902 0.048 149.535);
  --muted-foreground: oklch(0.39 0.025 149.36);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.085 0.02 331.379);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.085 0.02 331.379);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.406 0.116 333.64);
  --primary-foreground: oklch(0.913 0.034 330.713);
  --secondary: oklch(0.477 0.108 146.603);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.477 0.108 146.603);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.54 0.152 42.42);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.406 0.116 333.64);
  --chart-1: oklch(0.406 0.116 333.64);
  --chart-2: oklch(0.477 0.108 146.603);
  --chart-3: oklch(0.477 0.108 146.603);
  --chart-4: oklch(0.51 0.116 146.557);
  --chart-5: oklch(0.407 0.123 333.843);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.023 331.808);
  --foreground: oklch(0.992 0.002 330.277);
  --muted: oklch(0.3 0.059 147.187);
  --muted-foreground: oklch(0.805 0.021 149.896);
  --popover: oklch(0.152 0.027 332.205);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.152 0.027 332.205);
  --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.406 0.116 333.64);
  --primary-foreground: oklch(0.913 0.034 330.713);
  --secondary: oklch(0.477 0.108 146.603);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.477 0.108 146.603);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.699 0.156 45.388);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.406 0.116 333.64);
  --chart-1: oklch(0.406 0.116 333.64);
  --chart-2: oklch(0.477 0.108 146.603);
  --chart-3: oklch(0.477 0.108 146.603);
  --chart-4: oklch(0.51 0.116 146.557);
  --chart-5: oklch(0.407 0.123 333.843);
}