Trunk for shadcn/ui

Trunk is a shadcn/ui theme built around a deep blue primary color (#121a4a) with deep violet accents (#26124a). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the deep blue primary (#121a4a) on a neutral background (#040407).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#040407black
Foreground
#040610black
#f6f6f9whitesmoke
Card
#f8f9fcghostwhite
#040407black
Card foreground
#040610black
#f6f6f9whitesmoke
Popover
#f8f9fcghostwhite
#040407black
Popover foreground
#040610black
#f6f6f9whitesmoke
Primary
#121a4amidnightblue
#121a4amidnightblue
Primary foreground
#a5afe9lightsteelblue
#a5afe9lightsteelblue
Secondary
#12364adarkslategray
#12364adarkslategray
Secondary foreground
#a5d1e9lightblue
#a5d1e9lightblue
Muted
#e0e7eblavender
#141b1fblack
Muted foreground
#40464adarkslategray
#b5bcbfsilver
Accent
#26124amidnightblue
#26124amidnightblue
Accent foreground
#bda5e9plum
#bda5e9plum
Destructive
#8f2e04saddlebrown
#e44907orangered
Destructive foreground
#fdd8c9bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#121a4amidnightblue
#121a4amidnightblue

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button7.77:1AAA
Secondary button7.78:1AAA
Muted text7.66:1AAA
Accent7.68:1AAA
Destructive6.16:1AA
Dark mode
Text on background18.99:1AAA
Text on card18.99:1AAA
Primary button7.77:1AAA
Secondary button7.78:1AAA
Muted text9.03:1AAA
Accent7.68:1AAA
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.004 278.255);
  --foreground: oklch(0.126 0.025 271.687);
  --muted: oklch(0.924 0.009 230.795);
  --muted-foreground: oklch(0.391 0.01 231.031);
  --popover: oklch(0.981 0.004 278.255);
  --popover-foreground: oklch(0.126 0.025 271.687);
  --card: oklch(0.981 0.004 278.255);
  --card-foreground: oklch(0.126 0.025 271.687);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.245 0.089 270.788);
  --primary-foreground: oklch(0.767 0.084 276.478);
  --secondary: oklch(0.318 0.054 235.673);
  --secondary-foreground: oklch(0.838 0.057 231.83);
  --accent: oklch(0.247 0.098 294.126);
  --accent-foreground: oklch(0.766 0.099 300.132);
  --destructive: oklch(0.443 0.139 38.89);
  --destructive-foreground: oklch(0.91 0.047 44.537);
  --ring: oklch(0.245 0.089 270.788);
  --chart-1: oklch(0.245 0.089 270.788);
  --chart-2: oklch(0.318 0.054 235.673);
  --chart-3: oklch(0.247 0.098 294.126);
  --chart-4: oklch(0.351 0.061 235.937);
  --chart-5: oklch(0.244 0.093 270.299);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.009 275.288);
  --foreground: oklch(0.975 0.003 278.276);
  --muted: oklch(0.217 0.013 231.614);
  --muted-foreground: oklch(0.79 0.008 230.808);
  --popover: oklch(0.108 0.009 275.288);
  --popover-foreground: oklch(0.975 0.003 278.276);
  --card: oklch(0.108 0.009 275.288);
  --card-foreground: oklch(0.975 0.003 278.276);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.245 0.089 270.788);
  --primary-foreground: oklch(0.767 0.084 276.478);
  --secondary: oklch(0.318 0.054 235.673);
  --secondary-foreground: oklch(0.838 0.057 231.83);
  --accent: oklch(0.247 0.098 294.126);
  --accent-foreground: oklch(0.766 0.099 300.132);
  --destructive: oklch(0.618 0.2 37.862);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.245 0.089 270.788);
  --chart-1: oklch(0.245 0.089 270.788);
  --chart-2: oklch(0.318 0.054 235.673);
  --chart-3: oklch(0.247 0.098 294.126);
  --chart-4: oklch(0.351 0.061 235.937);
  --chart-5: oklch(0.244 0.093 270.299);
}