Trigger for shadcn/ui

Trigger is a shadcn/ui theme built around a muted deep violet primary color (#2f2c35) with muted light red accents (#d9d3d3). The light mode uses a neutral background (#f8f6fd). Dark mode keeps the muted deep violet primary (#2f2c35) on a violet-tinted background (#09070e).

Color palette

TokenLightDark
Background
#f8f6fdghostwhite
#09070eblack
Foreground
#040208black
#fcfcfdwhite
Card
#f5f2fdghostwhite
#0b0811black
Card foreground
#020104black
#ffffffwhite
Popover
#f8f6fdghostwhite
#09070eblack
Popover foreground
#040208black
#fcfcfdwhite
Primary
#2f2c35darkslategray
#2f2c35darkslategray
Primary foreground
#c7c4cfsilver
#c7c4cfsilver
Secondary
#e8e8e8lavender
#18161dblack
Secondary foreground
#4f4f4fdarkslategray
#afa9bcdarkgray
Muted
#f1e4e4mistyrose
#120e1bblack
Muted foreground
#4c3838darkslategray
#b9b3c7silver
Accent
#d9d3d3lightgrey
#282433darkslategray
Accent foreground
#423838darkslategray
#c0bacfsilver
Destructive
#a23d06saddlebrown
#f87935coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f2c35darkslategray
#2f2c35darkslategray

Contrast

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

Light mode
Text on background19.32:1AAA
Text on card18.85:1AAA
Primary button8.01:1AAA
Secondary button6.68:1AA
Muted text8.80:1AAA
Accent7.66:1AAA
Destructive6.54:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.85:1AAA
Primary button8.01:1AAA
Secondary button7.85:1AAA
Muted text9.35:1AAA
Accent8.05:1AAA
Destructive7.78:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.01 299.874);
  --foreground: oklch(0.098 0.023 300.281);
  --muted: oklch(0.93 0.014 17.405);
  --muted-foreground: oklch(0.364 0.028 18.545);
  --popover: oklch(0.978 0.01 299.874);
  --popover-foreground: oklch(0.098 0.023 300.281);
  --card: oklch(0.967 0.014 299.788);
  --card-foreground: oklch(0.078 0.018 300.281);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.299 0.018 299.032);
  --primary-foreground: oklch(0.826 0.015 299.729);
  --secondary: oklch(0.931 0 180);
  --secondary-foreground: oklch(0.428 0 180);
  --accent: oklch(0.872 0.007 17.295);
  --accent-foreground: oklch(0.352 0.014 17.828);
  --destructive: oklch(0.495 0.146 41.997);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.299 0.018 299.032);
  --chart-1: oklch(0.299 0.018 299.032);
  --chart-2: oklch(0.931 0 180);
  --chart-3: oklch(0.872 0.007 17.295);
  --chart-4: oklch(0.954 0 180);
  --chart-5: oklch(0.295 0.023 298.705);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.017 299.319);
  --foreground: oklch(0.991 0.002 300.01);
  --muted: oklch(0.176 0.026 297.42);
  --muted-foreground: oklch(0.777 0.029 299.416);
  --popover: oklch(0.133 0.017 299.319);
  --popover-foreground: oklch(0.991 0.002 300.01);
  --card: oklch(0.144 0.02 297.973);
  --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.299 0.018 299.032);
  --primary-foreground: oklch(0.826 0.015 299.729);
  --secondary: oklch(0.207 0.012 299.034);
  --secondary-foreground: oklch(0.746 0.027 299.434);
  --accent: oklch(0.271 0.029 298.183);
  --accent-foreground: oklch(0.8 0.03 299.401);
  --destructive: oklch(0.714 0.174 45.784);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.299 0.018 299.032);
  --chart-1: oklch(0.299 0.018 299.032);
  --chart-2: oklch(0.207 0.012 299.034);
  --chart-3: oklch(0.271 0.029 298.183);
  --chart-4: oklch(0.238 0.015 298.938);
  --chart-5: oklch(0.295 0.023 298.705);
}