Veto for shadcn/ui

Veto is a shadcn/ui theme built around a muted deep blue primary color (#2f3841) with muted deep green accents (#38412f). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#2f3841) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#ffffffwhite
#010304black
Foreground
#030a12black
#f7f7f8whitesmoke
Card
#fcfcfcsnow
#030507black
Card foreground
#02070dblack
#f9fafaghostwhite
Popover
#ffffffwhite
#010304black
Popover foreground
#030a12black
#f7f7f8whitesmoke
Primary
#2f3841darkslategray
#2f3841darkslategray
Primary foreground
#cad1d8lightgrey
#cad1d8lightgrey
Secondary
#412f38darkslategray
#412f38darkslategray
Secondary foreground
#d8cad1lightgrey
#d8cad1lightgrey
Muted
#ebe5e8linen
#1a1417black
Muted foreground
#4d4c4cdarkslategray
#b3b2b2darkgray
Accent
#38412fdarkslategray
#38412fdarkslategray
Accent foreground
#d1d8calightgrey
#d1d8calightgrey
Destructive
#8e3106saddlebrown
#f0530aorangered
Destructive foreground
#fdd9c9bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f3841darkslategray
#2f3841darkslategray

Contrast

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

Light mode
Text on background19.88:1AAA
Text on card19.78:1AAA
Primary button7.74:1AAA
Secondary button7.86:1AAA
Muted text6.88:1AA
Accent7.31:1AAA
Destructive6.15:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.52:1AAA
Primary button7.74:1AAA
Secondary button7.86:1AAA
Muted text8.59:1AAA
Accent7.31:1AAA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.14 0.022 243.891);
  --muted: oklch(0.927 0.008 346.248);
  --muted-foreground: oklch(0.417 0.002 346.166);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.14 0.022 243.891);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.126 0.019 240.41);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.336 0.02 250.171);
  --primary-foreground: oklch(0.857 0.013 249.791);
  --secondary: oklch(0.329 0.03 348.275);
  --secondary-foreground: oklch(0.852 0.019 346.598);
  --accent: oklch(0.361 0.032 130.126);
  --accent-foreground: oklch(0.874 0.021 129.388);
  --destructive: oklch(0.444 0.135 40.178);
  --destructive-foreground: oklch(0.912 0.045 46.363);
  --ring: oklch(0.336 0.02 250.171);
  --chart-1: oklch(0.336 0.02 250.171);
  --chart-2: oklch(0.329 0.03 348.275);
  --chart-3: oklch(0.361 0.032 130.126);
  --chart-4: oklch(0.358 0.033 348.33);
  --chart-5: oklch(0.335 0.024 250.268);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.008 243.095);
  --foreground: oklch(0.977 0.001 249.663);
  --muted: oklch(0.199 0.012 347.549);
  --muted-foreground: oklch(0.764 0.002 346.088);
  --popover: oklch(0.089 0.008 243.095);
  --popover-foreground: oklch(0.977 0.001 249.663);
  --card: oklch(0.112 0.01 243.095);
  --card-foreground: oklch(0.985 0.001 249.658);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.336 0.02 250.171);
  --primary-foreground: oklch(0.857 0.013 249.791);
  --secondary: oklch(0.329 0.03 348.275);
  --secondary-foreground: oklch(0.852 0.019 346.598);
  --accent: oklch(0.361 0.032 130.126);
  --accent-foreground: oklch(0.874 0.021 129.388);
  --destructive: oklch(0.649 0.204 39.078);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.336 0.02 250.171);
  --chart-1: oklch(0.336 0.02 250.171);
  --chart-2: oklch(0.329 0.03 348.275);
  --chart-3: oklch(0.361 0.032 130.126);
  --chart-4: oklch(0.358 0.033 348.33);
  --chart-5: oklch(0.335 0.024 250.268);
}