Effort for shadcn/ui

Effort is a shadcn/ui theme built around a deep violet primary color (#180e20) with neutral gray accents (#cfccd1). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#180e20) on a violet-tinted background (#0b070e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b070eblack
Foreground
#0b0410black
#fdfcfdwhite
Card
#fcfcfcsnow
#0d0811black
Card foreground
#08030cblack
#ffffffwhite
Popover
#fcfcfcsnow
#0d0811black
Popover foreground
#08030cblack
#ffffffwhite
Primary
#180e20black
#180e20black
Primary foreground
#b492cedarkgray
#b492cedarkgray
Secondary
#cfccd1lightgrey
#2e2d2fdarkslategray
Secondary foreground
#363239darkslategray
#c7c5c9silver
Muted
#f0ecf4whitesmoke
#100b13black
Muted foreground
#474748darkslategray
#b8b7b8silver
Accent
#cfccd1lightgrey
#2e2d2fdarkslategray
Accent foreground
#363239darkslategray
#c7c5c9silver
Destructive
#d41002red
#fd1808red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#180e20black
#180e20black

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card19.97:1AAA
Primary button7.06:1AAA
Secondary button7.88:1AAA
Muted text7.94:1AAA
Accent7.88:1AAA
Destructive5.41:1AA
Dark mode
Text on background19.57:1AAA
Text on card19.78:1AAA
Primary button7.06:1AAA
Secondary button8.03:1AAA
Muted text9.71:1AAA
Accent8.03:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.129 0.033 311.076);
  --muted: oklch(0.948 0.012 310.978);
  --muted-foreground: oklch(0.398 0.003 311.028);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.117 0.029 312.699);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.117 0.029 312.699);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.187 0.037 309.278);
  --primary-foreground: oklch(0.712 0.093 309.936);
  --secondary: oklch(0.848 0.009 310.995);
  --secondary-foreground: oklch(0.325 0.012 310.757);
  --accent: oklch(0.848 0.009 310.995);
  --accent-foreground: oklch(0.325 0.012 310.757);
  --destructive: oklch(0.55 0.22 29.854);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.187 0.037 309.278);
  --chart-1: oklch(0.187 0.037 309.278);
  --chart-2: oklch(0.848 0.009 310.995);
  --chart-3: oklch(0.848 0.009 310.995);
  --chart-4: oklch(0.873 0.007 311.012);
  --chart-5: oklch(0.186 0.04 309.107);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.018 310.957);
  --foreground: oklch(0.991 0.003 311.061);
  --muted: oklch(0.161 0.018 310.112);
  --muted-foreground: oklch(0.78 0.002 311.06);
  --popover: oklch(0.148 0.021 310.033);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.148 0.021 310.033);
  --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.187 0.037 309.278);
  --primary-foreground: oklch(0.712 0.093 309.936);
  --secondary: oklch(0.298 0.005 310.928);
  --secondary-foreground: oklch(0.827 0.005 311.031);
  --accent: oklch(0.298 0.005 310.928);
  --accent-foreground: oklch(0.827 0.005 311.031);
  --destructive: oklch(0.629 0.251 29.742);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.187 0.037 309.278);
  --chart-1: oklch(0.187 0.037 309.278);
  --chart-2: oklch(0.298 0.005 310.928);
  --chart-3: oklch(0.298 0.005 310.928);
  --chart-4: oklch(0.328 0.006 310.922);
  --chart-5: oklch(0.186 0.04 309.107);
}