Attainment for shadcn/ui

Attainment is a shadcn/ui theme built around a muted blue primary color (#6874a6) with muted light blue accents (#b6bcd2). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the muted blue primary (#6874a6) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#030407black
Foreground
#000000black
#fcfcfdwhite
Card
#f8f9fcghostwhite
#030407black
Card foreground
#000000black
#fcfcfdwhite
Popover
#f8f9fcghostwhite
#030407black
Popover foreground
#000000black
#fcfcfdwhite
Primary
#6874a6slategray
#6874a6slategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d8dae4gainsboro
#161717black
Secondary foreground
#383d52darkslategray
#aeafb2darkgray
Muted
#e1e4eflavender
#10131eblack
Muted foreground
#535665dimgray
#9a9eacdarkgray
Accent
#b6bcd2lightsteelblue
#26272cdarkslategray
Accent foreground
#212536darkslategray
#bebfc6silver
Destructive
#9a340esaddlebrown
#eb602dchocolate
Destructive foreground
#fce6demistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6874a6slategray
#6874a6slategray

Contrast

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

Light mode
Text on background19.93:1AAA
Text on card19.93:1AAA
Primary button4.50:1AA
Secondary button7.69:1AAA
Muted text5.73:1AA
Accent8.03:1AAA
Destructive6.11:1AA
Dark mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button4.50:1AA
Secondary button8.19:1AAA
Muted text6.93:1AA
Accent8.12:1AAA
Destructive6.25:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 274.989);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.92 0.015 274.835);
  --muted-foreground: oklch(0.456 0.024 274.316);
  --popover: oklch(0.982 0.004 274.989);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.004 274.989);
  --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.571 0.079 272.923);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.89 0.014 274.838);
  --secondary-foreground: oklch(0.364 0.037 273.556);
  --accent: oklch(0.798 0.032 274.5);
  --accent-foreground: oklch(0.269 0.032 273.274);
  --destructive: oklch(0.469 0.144 37.917);
  --destructive-foreground: oklch(0.941 0.026 41.114);
  --ring: oklch(0.571 0.079 272.923);
  --chart-1: oklch(0.571 0.079 272.923);
  --chart-2: oklch(0.89 0.014 274.838);
  --chart-3: oklch(0.798 0.032 274.5);
  --chart-4: oklch(0.915 0.011 274.89);
  --chart-5: oklch(0.565 0.088 272.601);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.01 271.043);
  --foreground: oklch(0.991 0.001 275.019);
  --muted: oklch(0.189 0.022 273.29);
  --muted-foreground: oklch(0.7 0.022 274.633);
  --popover: oklch(0.107 0.01 271.043);
  --popover-foreground: oklch(0.991 0.001 275.019);
  --card: oklch(0.107 0.01 271.043);
  --card-foreground: oklch(0.991 0.001 275.019);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.571 0.079 272.923);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.203 0.001 274.946);
  --secondary-foreground: oklch(0.754 0.004 274.975);
  --accent: oklch(0.274 0.009 274.631);
  --accent-foreground: oklch(0.806 0.01 274.884);
  --destructive: oklch(0.66 0.184 39.023);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.571 0.079 272.923);
  --chart-1: oklch(0.571 0.079 272.923);
  --chart-2: oklch(0.203 0.001 274.946);
  --chart-3: oklch(0.274 0.009 274.631);
  --chart-4: oklch(0.236 0.002 274.936);
  --chart-5: oklch(0.565 0.088 272.601);
}