Cope for shadcn/ui

Cope is a shadcn/ui theme built around a muted blue primary color (#757e8a) with muted light blue accents (#d7dbe0). The light mode uses a neutral background (#f7fafd). Dark mode keeps the muted blue primary (#757e8a) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#f7fafdghostwhite
#010204black
Foreground
#02070dblack
#f8fafcghostwhite
Card
#f7fafdghostwhite
#010204black
Card foreground
#02070dblack
#f8fafcghostwhite
Popover
#f7fafdghostwhite
#010204black
Popover foreground
#02070dblack
#f8fafcghostwhite
Primary
#757e8aslategray
#757e8aslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d7dbe0gainsboro
#101418black
Secondary foreground
#3a414bdarkslategray
#9dabbedarkgray
Muted
#d8dbdfgainsboro
#202327darkslategray
Muted foreground
#4d535cdarkslategray
#a3aab2darkgray
Accent
#d7dbe0gainsboro
#101418black
Accent foreground
#3a414bdarkslategray
#9dabbedarkgray
Destructive
#7a0e00maroon
#eb1b00red
Destructive foreground
#ffb7adlightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#757e8aslategray
#757e8aslategray

Contrast

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

Light mode
Text on background19.24:1AAA
Text on card19.24:1AAA
Primary button4.10:1AA Large
Secondary button7.38:1AAA
Muted text5.57:1AA
Accent7.38:1AAA
Destructive6.65:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button4.10:1AA Large
Secondary button7.92:1AAA
Muted text6.70:1AA
Accent7.92:1AAA
Destructive4.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 254.982);
  --foreground: oklch(0.124 0.02 244.939);
  --muted: oklch(0.89 0.006 254.993);
  --muted-foreground: oklch(0.44 0.016 255.124);
  --popover: oklch(0.983 0.005 254.982);
  --popover-foreground: oklch(0.124 0.02 244.939);
  --card: oklch(0.983 0.005 254.982);
  --card-foreground: oklch(0.124 0.02 244.939);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.59 0.021 255.115);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.889 0.008 255.004);
  --secondary-foreground: oklch(0.373 0.02 255.175);
  --accent: oklch(0.889 0.008 255.004);
  --accent-foreground: oklch(0.373 0.02 255.175);
  --destructive: oklch(0.372 0.143 31.564);
  --destructive-foreground: oklch(0.844 0.086 27.442);
  --ring: oklch(0.59 0.021 255.115);
  --chart-1: oklch(0.59 0.021 255.115);
  --chart-2: oklch(0.889 0.008 255.004);
  --chart-3: oklch(0.889 0.008 255.004);
  --chart-4: oklch(0.913 0.007 254.993);
  --chart-5: oklch(0.587 0.028 255.162);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.009 247.566);
  --foreground: oklch(0.984 0.003 254.97);
  --muted: oklch(0.256 0.009 255.114);
  --muted-foreground: oklch(0.735 0.014 255.052);
  --popover: oklch(0.088 0.009 247.566);
  --popover-foreground: oklch(0.984 0.003 254.97);
  --card: oklch(0.088 0.009 247.566);
  --card-foreground: oklch(0.984 0.003 254.97);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.59 0.021 255.115);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.189 0.011 255.193);
  --secondary-foreground: oklch(0.737 0.031 255.141);
  --accent: oklch(0.189 0.011 255.193);
  --accent-foreground: oklch(0.737 0.031 255.141);
  --destructive: oklch(0.597 0.235 30.6);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.59 0.021 255.115);
  --chart-1: oklch(0.59 0.021 255.115);
  --chart-2: oklch(0.189 0.011 255.193);
  --chart-3: oklch(0.189 0.011 255.193);
  --chart-4: oklch(0.221 0.014 255.215);
  --chart-5: oklch(0.587 0.028 255.162);
}