Boycott for shadcn/ui

Boycott is a shadcn/ui theme built around a deep violet primary color (#1b152d) with deep purple accents (#27152d). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the deep violet primary (#1b152d) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#040307black
Foreground
#090614black
#fcfcfdwhite
Card
#f5f3fcghostwhite
#06050bblack
Card foreground
#070510black
#ffffffwhite
Popover
#f8f7fdghostwhite
#040307black
Popover foreground
#090614black
#fcfcfdwhite
Primary
#1b152dblack
#1b152dblack
Primary foreground
#aea1d3lightsteelblue
#aea1d3lightsteelblue
Secondary
#151b2dblack
#151b2dblack
Secondary foreground
#a1aed3lightsteelblue
#a1aed3lightsteelblue
Muted
#e9ebf2lavender
#0d1016black
Muted foreground
#3e4047darkslategray
#b8bac1silver
Accent
#27152dblack
#27152dblack
Accent foreground
#c7a1d3plum
#c7a1d3plum
Destructive
#d02f0bfirebrick
#ed360corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1b152dblack
#1b152dblack

Contrast

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

Light mode
Text on background18.79:1AAA
Text on card18.35:1AAA
Primary button7.40:1AAA
Secondary button7.73:1AAA
Muted text8.67:1AAA
Accent7.67:1AAA
Destructive5.11:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.33:1AAA
Primary button7.40:1AAA
Secondary button7.73:1AAA
Muted text9.83:1AAA
Accent7.67:1AAA
Destructive4.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 297.67);
  --foreground: oklch(0.137 0.031 294.991);
  --muted: oklch(0.94 0.009 271.316);
  --muted-foreground: oklch(0.372 0.012 271.073);
  --popover: oklch(0.978 0.009 297.67);
  --popover-foreground: oklch(0.137 0.031 294.991);
  --card: oklch(0.968 0.013 297.589);
  --card-foreground: oklch(0.126 0.027 296.356);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.217 0.046 293.705);
  --primary-foreground: oklch(0.738 0.072 296.058);
  --secondary: oklch(0.226 0.036 269.329);
  --secondary-foreground: oklch(0.753 0.055 270.58);
  --accent: oklch(0.233 0.051 317.31);
  --accent-foreground: oklch(0.76 0.081 317.584);
  --destructive: oklch(0.561 0.201 32.938);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.217 0.046 293.705);
  --chart-1: oklch(0.217 0.046 293.705);
  --chart-2: oklch(0.226 0.036 269.329);
  --chart-3: oklch(0.233 0.051 317.31);
  --chart-4: oklch(0.254 0.043 269.164);
  --chart-5: oklch(0.215 0.05 293.26);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.104 0.015 297.606);
  --foreground: oklch(0.991 0.002 297.79);
  --muted: oklch(0.172 0.014 270.442);
  --muted-foreground: oklch(0.79 0.01 271.287);
  --popover: oklch(0.104 0.015 297.606);
  --popover-foreground: oklch(0.991 0.002 297.79);
  --card: oklch(0.119 0.017 297.582);
  --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.217 0.046 293.705);
  --primary-foreground: oklch(0.738 0.072 296.058);
  --secondary: oklch(0.226 0.036 269.329);
  --secondary-foreground: oklch(0.753 0.055 270.58);
  --accent: oklch(0.233 0.051 317.31);
  --accent-foreground: oklch(0.76 0.081 317.584);
  --destructive: oklch(0.618 0.223 32.838);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.217 0.046 293.705);
  --chart-1: oklch(0.217 0.046 293.705);
  --chart-2: oklch(0.226 0.036 269.329);
  --chart-3: oklch(0.233 0.051 317.31);
  --chart-4: oklch(0.254 0.043 269.164);
  --chart-5: oklch(0.215 0.05 293.26);
}