Primary for shadcn/ui

Primary is a shadcn/ui theme built around a near-black primary color (#111113) with near-black accents (#111113). The light mode uses a neutral background (#f7f9fd). Dark mode keeps the near-black primary (#111113) on a blue-tinted background (#040810).

Color palette

TokenLightDark
Background
#f7f9fdghostwhite
#040810black
Foreground
#000000black
#ffffffwhite
Card
#f7f9fdghostwhite
#040810black
Card foreground
#000000black
#ffffffwhite
Popover
#f7f9fdghostwhite
#040810black
Popover foreground
#000000black
#ffffffwhite
Primary
#111113black
#111113black
Primary foreground
#a7a9afdarkgray
#a7a9afdarkgray
Secondary
#111213black
#111213black
Secondary foreground
#a7adafdarkgray
#a7adafdarkgray
Muted
#d6e3e6gainsboro
#192629darkslategray
Muted foreground
#484f51darkslategray
#aeb5b7darkgray
Accent
#111113black
#111113black
Accent foreground
#a8a7afdarkgray
#a8a7afdarkgray
Destructive
#d84703orangered
#fb5204orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#111113black
#111113black

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button8.00:1AAA
Secondary button8.23:1AAA
Muted text6.33:1AA
Accent7.91:1AAA
Destructive4.36:1AA Large
Dark mode
Text on background20.08:1AAA
Text on card20.08:1AAA
Primary button8.00:1AAA
Secondary button8.23:1AAA
Muted text7.48:1AAA
Accent7.91:1AAA
Destructive3.32:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 268.753);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.906 0.015 216.09);
  --muted-foreground: oklch(0.422 0.01 216.135);
  --popover: oklch(0.981 0.005 268.753);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.005 268.753);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.18 0.003 268.679);
  --primary-foreground: oklch(0.735 0.009 268.702);
  --secondary: oklch(0.182 0.002 216.072);
  --secondary-foreground: oklch(0.744 0.008 216.059);
  --accent: oklch(0.179 0.004 295.956);
  --accent-foreground: oklch(0.731 0.012 296.028);
  --destructive: oklch(0.596 0.192 38.547);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.18 0.003 268.679);
  --chart-1: oklch(0.18 0.003 268.679);
  --chart-2: oklch(0.182 0.002 216.072);
  --chart-3: oklch(0.179 0.004 295.956);
  --chart-4: oklch(0.217 0.003 216.083);
  --chart-5: oklch(0.179 0.004 268.603);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.132 0.022 262.178);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.258 0.019 216.731);
  --muted-foreground: oklch(0.768 0.009 216.062);
  --popover: oklch(0.132 0.022 262.178);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.132 0.022 262.178);
  --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.18 0.003 268.679);
  --primary-foreground: oklch(0.735 0.009 268.702);
  --secondary: oklch(0.182 0.002 216.072);
  --secondary-foreground: oklch(0.744 0.008 216.059);
  --accent: oklch(0.179 0.004 295.956);
  --accent-foreground: oklch(0.731 0.012 296.028);
  --destructive: oklch(0.667 0.216 38.241);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.18 0.003 268.679);
  --chart-1: oklch(0.18 0.003 268.679);
  --chart-2: oklch(0.182 0.002 216.072);
  --chart-3: oklch(0.179 0.004 295.956);
  --chart-4: oklch(0.217 0.003 216.083);
  --chart-5: oklch(0.179 0.004 268.603);
}