Focused for shadcn/ui

Focused is a shadcn/ui theme built around a muted blue primary color (#a3acc7) with muted violet accents (#ada3c7). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the muted blue primary (#a3acc7) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#020203black
Foreground
#040815black
#ffffffwhite
Card
#f8f9fcghostwhite
#020203black
Card foreground
#040815black
#ffffffwhite
Popover
#f8f9fcghostwhite
#020203black
Popover foreground
#040815black
#ffffffwhite
Primary
#a3acc7darkgray
#a3acc7darkgray
Primary foreground
#151823black
#151823black
Secondary
#a3bdc7lightsteelblue
#a3bdc7lightsteelblue
Secondary foreground
#151f23black
#151f23black
Muted
#cfdde2gainsboro
#1d2b30darkslategray
Muted foreground
#4a5154darkslategray
#abb2b5darkgray
Accent
#ada3c7darkgray
#ada3c7darkgray
Accent foreground
#191523black
#191523black
Destructive
#73190dmaroon
#ea523etomato
Destructive foreground
#f7c1balightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a3acc7darkgray
#a3acc7darkgray

Contrast

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

Light mode
Text on background18.93:1AAA
Text on card18.93:1AAA
Primary button7.79:1AAA
Secondary button8.54:1AAA
Muted text5.82:1AA
Accent7.54:1AAA
Destructive7.11:1AAA
Dark mode
Text on background20.73:1AAA
Text on card20.73:1AAA
Primary button7.79:1AAA
Secondary button8.54:1AAA
Muted text6.80:1AA
Accent7.54:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 272.607);
  --foreground: oklch(0.139 0.03 265.891);
  --muted: oklch(0.889 0.017 221.482);
  --muted-foreground: oklch(0.431 0.01 221.528);
  --popover: oklch(0.981 0.005 272.607);
  --popover-foreground: oklch(0.139 0.03 265.891);
  --card: oklch(0.981 0.005 272.607);
  --card-foreground: oklch(0.139 0.03 265.891);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.746 0.04 272.022);
  --primary-foreground: oklch(0.213 0.021 271.389);
  --secondary: oklch(0.783 0.031 221.746);
  --secondary-foreground: oklch(0.232 0.016 222.219);
  --accent: oklch(0.736 0.052 297.328);
  --accent-foreground: oklch(0.208 0.027 296.243);
  --destructive: oklch(0.366 0.126 31.008);
  --destructive-foreground: oklch(0.858 0.063 27.107);
  --ring: oklch(0.746 0.04 272.022);
  --chart-1: oklch(0.746 0.04 272.022);
  --chart-2: oklch(0.783 0.031 221.746);
  --chart-3: oklch(0.736 0.052 297.328);
  --chart-4: oklch(0.806 0.028 221.674);
  --chart-5: oklch(0.742 0.045 271.926);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.008 268.573);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.277 0.021 222.404);
  --muted-foreground: oklch(0.759 0.009 221.407);
  --popover: oklch(0.086 0.008 268.573);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.086 0.008 268.573);
  --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.746 0.04 272.022);
  --primary-foreground: oklch(0.213 0.021 271.389);
  --secondary: oklch(0.783 0.031 221.746);
  --secondary-foreground: oklch(0.232 0.016 222.219);
  --accent: oklch(0.736 0.052 297.328);
  --accent-foreground: oklch(0.208 0.027 296.243);
  --destructive: oklch(0.642 0.191 30.491);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.746 0.04 272.022);
  --chart-1: oklch(0.746 0.04 272.022);
  --chart-2: oklch(0.783 0.031 221.746);
  --chart-3: oklch(0.736 0.052 297.328);
  --chart-4: oklch(0.806 0.028 221.674);
  --chart-5: oklch(0.742 0.045 271.926);
}