Focus for shadcn/ui

Focus is a shadcn/ui theme built around a pink primary color (#901d47) with blue accents (#1d4790). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the pink primary (#901d47) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8f9snow
#000000black
Foreground
#15050bblack
#fdfcfcsnow
Card
#fcf8f9snow
#000000black
Card foreground
#15050bblack
#fdfcfcsnow
Popover
#fcf8f9snow
#000000black
Popover foreground
#15050bblack
#fdfcfcsnow
Primary
#901d47brown
#901d47brown
Primary foreground
#fae6edlinen
#fae6edlinen
Secondary
#47901dolivedrab
#47901dolivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dce5d7gainsboro
#1f281ablack
Muted foreground
#5d6f52dimgray
#9aad90darkseagreen
Accent
#1d4790darkslateblue
#1d4790darkslateblue
Accent foreground
#e6edfalavender
#e6edfalavender
Destructive
#d23d14firebrick
#ed623btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#901d47brown
#901d47brown

Contrast

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

Light mode
Text on background18.79:1AAA
Text on card18.79:1AAA
Primary button7.16:1AAA
Secondary button3.98:1AA Large
Muted text4.19:1AA Large
Accent7.54:1AAA
Destructive4.75:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.50:1AAA
Primary button7.16:1AAA
Secondary button3.98:1AA Large
Muted text6.34:1AA
Accent7.54:1AAA
Destructive6.38:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 352.732);
  --foreground: oklch(0.146 0.033 356.257);
  --muted: oklch(0.911 0.021 133.75);
  --muted-foreground: oklch(0.52 0.05 134.25);
  --popover: oklch(0.982 0.005 352.732);
  --popover-foreground: oklch(0.146 0.033 356.257);
  --card: oklch(0.982 0.005 352.732);
  --card-foreground: oklch(0.146 0.033 356.257);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.437 0.152 4.406);
  --primary-foreground: oklch(0.942 0.024 353.295);
  --secondary: oklch(0.584 0.162 136.896);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.413 0.129 260.537);
  --accent-foreground: oklch(0.944 0.019 261.497);
  --destructive: oklch(0.576 0.192 34.895);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.152 4.406);
  --chart-1: oklch(0.437 0.152 4.406);
  --chart-2: oklch(0.584 0.162 136.896);
  --chart-3: oklch(0.413 0.129 260.537);
  --chart-4: oklch(0.621 0.173 136.942);
  --chart-5: oklch(0.44 0.156 5.057);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 352.597);
  --muted: oklch(0.264 0.028 134.334);
  --muted-foreground: oklch(0.724 0.046 134.019);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 352.597);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 352.597);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.437 0.152 4.406);
  --primary-foreground: oklch(0.942 0.024 353.295);
  --secondary: oklch(0.584 0.162 136.896);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.413 0.129 260.537);
  --accent-foreground: oklch(0.944 0.019 261.497);
  --destructive: oklch(0.665 0.181 36.197);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.437 0.152 4.406);
  --chart-1: oklch(0.437 0.152 4.406);
  --chart-2: oklch(0.584 0.162 136.896);
  --chart-3: oklch(0.413 0.129 260.537);
  --chart-4: oklch(0.621 0.173 136.942);
  --chart-5: oklch(0.44 0.156 5.057);
}