Shofar for shadcn/ui

Shofar is a shadcn/ui theme built around a blue primary color (#5a95d8) with muted light blue accents (#dbdee1). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#5a95d8) on a blue-tinted background (#040a10).

Color palette

TokenLightDark
Background
#ffffffwhite
#040a10black
Foreground
#010204black
#f6f7f9whitesmoke
Card
#fcfcfcsnow
#060c14black
Card foreground
#000000black
#f9fafbghostwhite
Popover
#ffffffwhite
#040a10black
Popover foreground
#010204black
#f6f7f9whitesmoke
Primary
#5a95d8cornflowerblue
#5a95d8cornflowerblue
Primary foreground
#000000black
#000000black
Secondary
#eaebeblavender
#25292ddarkslategray
Secondary foreground
#4e5155darkslategray
#bcc1c8silver
Muted
#e6edf4lavender
#0b1119black
Muted foreground
#5b6571dimgray
#8e98a4lightslategray
Accent
#dbdee1gainsboro
#363f4adarkslategray
Accent foreground
#3e444cdarkslategray
#d3d8dfgainsboro
Destructive
#8f1e05darkred
#f85935tomato
Destructive foreground
#fdd2c9peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5a95d8cornflowerblue
#5a95d8cornflowerblue

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.54:1AAA
Primary button6.71:1AA
Secondary button6.65:1AA
Muted text5.00:1AA
Accent7.25:1AAA
Destructive6.47:1AA
Dark mode
Text on background18.55:1AAA
Text on card18.75:1AAA
Primary button6.71:1AA
Secondary button8.13:1AAA
Muted text6.46:1AA
Accent7.45:1AAA
Destructive6.45:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.087 0.012 241.538);
  --muted: oklch(0.942 0.013 251.557);
  --muted-foreground: oklch(0.503 0.023 251.787);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.087 0.012 241.538);
  --card: oklch(0.992 0 161.565);
  --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.658 0.119 252.897);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.938 0.001 251.463);
  --secondary-foreground: oklch(0.435 0.007 251.577);
  --accent: oklch(0.898 0.006 251.504);
  --accent-foreground: oklch(0.385 0.015 251.743);
  --destructive: oklch(0.425 0.151 33.206);
  --destructive-foreground: oklch(0.899 0.05 32.783);
  --ring: oklch(0.658 0.119 252.897);
  --chart-1: oklch(0.658 0.119 252.897);
  --chart-2: oklch(0.938 0.001 251.463);
  --chart-3: oklch(0.898 0.006 251.504);
  --chart-4: oklch(0.962 0.001 251.458);
  --chart-5: oklch(0.658 0.124 253.001);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.017 247.014);
  --foreground: oklch(0.976 0.002 251.468);
  --muted: oklch(0.176 0.019 252.207);
  --muted-foreground: oklch(0.676 0.021 251.691);
  --popover: oklch(0.14 0.017 247.014);
  --popover-foreground: oklch(0.976 0.002 251.468);
  --card: oklch(0.152 0.02 249.913);
  --card-foreground: oklch(0.984 0.001 251.462);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.658 0.119 252.897);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.277 0.01 251.715);
  --secondary-foreground: oklch(0.81 0.011 251.56);
  --accent: oklch(0.364 0.023 251.897);
  --accent-foreground: oklch(0.881 0.011 251.55);
  --destructive: oklch(0.671 0.201 34.097);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.658 0.119 252.897);
  --chart-1: oklch(0.658 0.119 252.897);
  --chart-2: oklch(0.277 0.01 251.715);
  --chart-3: oklch(0.364 0.023 251.897);
  --chart-4: oklch(0.307 0.011 251.725);
  --chart-5: oklch(0.658 0.124 253.001);
}