Variable for shadcn/ui

Variable is a shadcn/ui theme built around a vivid deep blue primary color (#08103b) with vivid deep yellow accents (#3b3208). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the vivid deep blue primary (#08103b) on a neutral background (#040407).

Color palette

TokenLightDark
Background
#fbfcfewhite
#040407black
Foreground
#050710black
#f9f9fbghostwhite
Card
#fbfcfewhite
#040407black
Card foreground
#050710black
#f9f9fbghostwhite
Popover
#fbfcfewhite
#040407black
Popover foreground
#050710black
#f9f9fbghostwhite
Primary
#08103bmidnightblue
#08103bmidnightblue
Primary foreground
#8597efcornflowerblue
#8597efcornflowerblue
Secondary
#3b3208darkolivegreen
#3b3208darkolivegreen
Secondary foreground
#e3c52bgoldenrod
#e3c52bgoldenrod
Muted
#e6e2d1gainsboro
#2e2b19darkslategray
Muted foreground
#686555dimgray
#aaa797darkgray
Accent
#3b3208darkolivegreen
#3b3208darkolivegreen
Accent foreground
#e3c52bgoldenrod
#e3c52bgoldenrod
Destructive
#a54312saddlebrown
#e6611echocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#08103bmidnightblue
#08103bmidnightblue

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button6.68:1AA
Secondary button7.46:1AAA
Muted text4.52:1AA
Accent7.46:1AAA
Destructive6.13:1AA
Dark mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button6.68:1AA
Secondary button7.46:1AAA
Muted text5.88:1AA
Accent7.46:1AAA
Destructive6.08:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 277.224);
  --foreground: oklch(0.129 0.022 271.568);
  --muted: oklch(0.912 0.024 97.597);
  --muted-foreground: oklch(0.504 0.024 97.842);
  --popover: oklch(0.99 0.003 277.224);
  --popover-foreground: oklch(0.129 0.022 271.568);
  --card: oklch(0.99 0.003 277.224);
  --card-foreground: oklch(0.129 0.022 271.568);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.2 0.083 268.618);
  --primary-foreground: oklch(0.699 0.131 273.96);
  --secondary: oklch(0.318 0.059 97.375);
  --secondary-foreground: oklch(0.825 0.16 96.796);
  --accent: oklch(0.318 0.059 97.375);
  --accent-foreground: oklch(0.825 0.16 96.796);
  --destructive: oklch(0.509 0.141 42.706);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.2 0.083 268.618);
  --chart-1: oklch(0.2 0.083 268.618);
  --chart-2: oklch(0.318 0.059 97.375);
  --chart-3: oklch(0.318 0.059 97.375);
  --chart-4: oklch(0.363 0.069 97.13);
  --chart-5: oklch(0.199 0.086 268.073);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.009 274.242);
  --foreground: oklch(0.983 0.002 277.228);
  --muted: oklch(0.287 0.03 98.263);
  --muted-foreground: oklch(0.726 0.022 97.65);
  --popover: oklch(0.108 0.009 274.242);
  --popover-foreground: oklch(0.983 0.002 277.228);
  --card: oklch(0.108 0.009 274.242);
  --card-foreground: oklch(0.983 0.002 277.228);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.2 0.083 268.618);
  --primary-foreground: oklch(0.699 0.131 273.96);
  --secondary: oklch(0.318 0.059 97.375);
  --secondary-foreground: oklch(0.825 0.16 96.796);
  --accent: oklch(0.318 0.059 97.375);
  --accent-foreground: oklch(0.825 0.16 96.796);
  --destructive: oklch(0.652 0.181 42.709);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.2 0.083 268.618);
  --chart-1: oklch(0.2 0.083 268.618);
  --chart-2: oklch(0.318 0.059 97.375);
  --chart-3: oklch(0.318 0.059 97.375);
  --chart-4: oklch(0.363 0.069 97.13);
  --chart-5: oklch(0.199 0.086 268.073);
}