Weak for shadcn/ui

Weak is a shadcn/ui theme built around a vivid deep teal primary color (#0a665b) with vivid deep yellow accents (#665b0a). The light mode uses a neutral background (#f8fbfb). Dark mode keeps the vivid deep teal primary (#0a665b) on a neutral background (#020403).

Color palette

TokenLightDark
Background
#f8fbfbghostwhite
#020403black
Foreground
#04100fblack
#f8fbfbghostwhite
Card
#f8fbfbghostwhite
#020403black
Card foreground
#04100fblack
#f8fbfbghostwhite
Popover
#f8fbfbghostwhite
#020403black
Popover foreground
#04100fblack
#f8fbfbghostwhite
Primary
#0a665bdarkslategray
#0a665bdarkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5b0a66indigo
#5b0a66indigo
Secondary foreground
#eeabf7plum
#eeabf7plum
Muted
#e3cbe6gainsboro
#311934darkslategray
Muted foreground
#615c61dimgray
#a39ea3darkgray
Accent
#665b0adarkolivegreen
#665b0adarkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#700a01maroon
#fe1b06red
Destructive foreground
#ffaba4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0a665bdarkslategray
#0a665bdarkslategray

Contrast

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

Light mode
Text on background18.64:1AAA
Text on card18.64:1AAA
Primary button6.84:1AA
Secondary button7.00:1AAA
Muted text4.35:1AA Large
Accent6.81:1AA
Destructive6.72:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button6.84:1AA
Secondary button7.00:1AAA
Muted text6.06:1AA
Accent6.81:1AA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.003 188.831);
  --foreground: oklch(0.162 0.02 186.579);
  --muted: oklch(0.871 0.044 322.283);
  --muted-foreground: oklch(0.48 0.011 322.19);
  --popover: oklch(0.987 0.003 188.831);
  --popover-foreground: oklch(0.162 0.02 186.579);
  --card: oklch(0.987 0.003 188.831);
  --card-foreground: oklch(0.162 0.02 186.579);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.46 0.079 182.198);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.345 0.153 322.468);
  --secondary-foreground: oklch(0.83 0.125 322.578);
  --accent: oklch(0.469 0.094 100.971);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.347 0.135 30.917);
  --destructive-foreground: oklch(0.821 0.099 25.174);
  --ring: oklch(0.46 0.079 182.198);
  --chart-1: oklch(0.46 0.079 182.198);
  --chart-2: oklch(0.345 0.153 322.468);
  --chart-3: oklch(0.469 0.094 100.971);
  --chart-4: oklch(0.377 0.169 322.423);
  --chart-5: oklch(0.465 0.081 181.996);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.008 188.432);
  --foreground: oklch(0.987 0.003 188.834);
  --muted: oklch(0.258 0.058 322.75);
  --muted-foreground: oklch(0.705 0.01 322.161);
  --popover: oklch(0.097 0.008 188.432);
  --popover-foreground: oklch(0.987 0.003 188.834);
  --card: oklch(0.097 0.008 188.432);
  --card-foreground: oklch(0.987 0.003 188.834);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.46 0.079 182.198);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.345 0.153 322.468);
  --secondary-foreground: oklch(0.83 0.125 322.578);
  --accent: oklch(0.469 0.094 100.971);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.632 0.251 29.995);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.46 0.079 182.198);
  --chart-1: oklch(0.46 0.079 182.198);
  --chart-2: oklch(0.345 0.153 322.468);
  --chart-3: oklch(0.469 0.094 100.971);
  --chart-4: oklch(0.377 0.169 322.423);
  --chart-5: oklch(0.465 0.081 181.996);
}