Underwire for shadcn/ui

Underwire is a shadcn/ui theme built around a vivid indigo primary color (#0616ef) with vivid violet accents (#6b06ef). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid indigo primary (#0616ef) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#000000black
Foreground
#020308black
#ffffffwhite
Card
#f8f8fcghostwhite
#000000black
Card foreground
#020308black
#ffffffwhite
Popover
#f8f8fcghostwhite
#000000black
Popover foreground
#020308black
#ffffffwhite
Primary
#0616efblue
#0616efblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#068aefdodgerblue
#068aefdodgerblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7ebeflavender
#101518black
Muted foreground
#45484adarkslategray
#b5b8basilver
Accent
#6b06efblueviolet
#6b06efblueviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#702000maroon
#ff692etomato
Destructive foreground
#ffbda3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0616efblue
#0616efblue

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button8.88:1AAA
Secondary button3.57:1AA Large
Muted text7.68:1AAA
Accent7.25:1AAA
Destructive6.88:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.88:1AAA
Secondary button3.57:1AA Large
Muted text9.21:1AAA
Accent7.25:1AAA
Destructive7.31:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 283.023);
  --foreground: oklch(0.098 0.018 277.951);
  --muted: oklch(0.938 0.007 240.385);
  --muted-foreground: oklch(0.399 0.006 240.49);
  --popover: oklch(0.981 0.005 283.023);
  --popover-foreground: oklch(0.098 0.018 277.951);
  --card: oklch(0.981 0.005 283.023);
  --card-foreground: oklch(0.098 0.018 277.951);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.44 0.291 264.615);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.626 0.179 250.833);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.493 0.277 289.436);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.368 0.119 38.472);
  --destructive-foreground: oklch(0.853 0.084 42.52);
  --ring: oklch(0.44 0.291 264.615);
  --chart-1: oklch(0.44 0.291 264.615);
  --chart-2: oklch(0.626 0.179 250.833);
  --chart-3: oklch(0.493 0.277 289.436);
  --chart-4: oklch(0.65 0.183 250.339);
  --chart-5: oklch(0.442 0.296 264.326);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.192 0.01 241.048);
  --muted-foreground: oklch(0.781 0.005 240.373);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.44 0.291 264.615);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.626 0.179 250.833);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.493 0.277 289.436);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.702 0.196 39.962);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.44 0.291 264.615);
  --chart-1: oklch(0.44 0.291 264.615);
  --chart-2: oklch(0.626 0.179 250.833);
  --chart-3: oklch(0.493 0.277 289.436);
  --chart-4: oklch(0.65 0.183 250.339);
  --chart-5: oklch(0.442 0.296 264.326);
}