Underweight for shadcn/ui

Underweight is a shadcn/ui theme built around a blue primary color (#296689) with green accents (#668929). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the blue primary (#296689) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdfewhite
#000000black
Foreground
#03090cblack
#ffffffwhite
Card
#f7fbfdghostwhite
#030303black
Card foreground
#020608black
#ffffffwhite
Popover
#f7fbfdghostwhite
#030303black
Popover foreground
#020608black
#ffffffwhite
Primary
#296689teal
#296689teal
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#892966purple
#892966purple
Secondary foreground
#f9ebf4lavenderblush
#f9ebf4lavenderblush
Muted
#f5eaf1whitesmoke
#150a11black
Muted foreground
#6a6267dimgray
#9d959adarkgray
Accent
#668929olivedrab
#668929olivedrab
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#84290bsaddlebrown
#ec4d18orangered
Destructive foreground
#fad3c6peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#296689teal
#296689teal

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.50:1AAA
Primary button6.24:1AA
Secondary button7.05:1AAA
Muted text5.04:1AA
Accent4.03:1AA Large
Destructive6.59:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button6.24:1AA
Secondary button7.05:1AAA
Muted text6.65:1AA
Accent4.03:1AA Large
Destructive3.71:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 232.612);
  --foreground: oklch(0.133 0.013 226.825);
  --muted: oklch(0.948 0.015 339.065);
  --muted-foreground: oklch(0.505 0.013 339.264);
  --popover: oklch(0.985 0.005 232.645);
  --popover-foreground: oklch(0.116 0.012 226.121);
  --card: oklch(0.985 0.005 232.645);
  --card-foreground: oklch(0.116 0.012 226.121);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.487 0.084 237.524);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.449 0.146 345.659);
  --secondary-foreground: oklch(0.954 0.019 339.136);
  --accent: oklch(0.585 0.13 127.444);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.417 0.131 36.955);
  --destructive-foreground: oklch(0.898 0.047 39.278);
  --ring: oklch(0.487 0.084 237.524);
  --chart-1: oklch(0.487 0.084 237.524);
  --chart-2: oklch(0.449 0.146 345.659);
  --chart-3: oklch(0.585 0.13 127.444);
  --chart-4: oklch(0.475 0.156 345.733);
  --chart-5: oklch(0.489 0.088 237.943);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.163 0.024 341.653);
  --muted-foreground: oklch(0.678 0.012 339.098);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.487 0.084 237.524);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.449 0.146 345.659);
  --secondary-foreground: oklch(0.954 0.019 339.136);
  --accent: oklch(0.585 0.13 127.444);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.637 0.204 36.63);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.487 0.084 237.524);
  --chart-1: oklch(0.487 0.084 237.524);
  --chart-2: oklch(0.449 0.146 345.659);
  --chart-3: oklch(0.585 0.13 127.444);
  --chart-4: oklch(0.475 0.156 345.733);
  --chart-5: oklch(0.489 0.088 237.943);
}