Role for shadcn/ui

Role is a shadcn/ui theme built around a muted light teal primary color (#c7d6d0) with muted light teal accents (#c7d5d6). The light mode uses a neutral background (#fbfefd). Dark mode keeps the muted light teal primary (#c7d6d0) on a teal-tinted background (#050a08).

Color palette

TokenLightDark
Background
#fbfefdwhite
#050a08black
Foreground
#020806black
#f5faf8mintcream
Card
#fbfefdwhite
#050a08black
Card foreground
#020806black
#f5faf8mintcream
Popover
#fbfefdwhite
#050a08black
Popover foreground
#020806black
#f5faf8mintcream
Primary
#c7d6d0lightgrey
#c7d6d0lightgrey
Primary foreground
#2e3e37darkslategray
#2e3e37darkslategray
Secondary
#c7d6c8lightgrey
#c7d6c8lightgrey
Secondary foreground
#2e3e2fdarkslategray
#2e3e2fdarkslategray
Muted
#e5f0e6beige
#0f1a0fblack
Muted foreground
#414e42darkslategray
#b1beb2silver
Accent
#c7d5d6lightgrey
#c7d5d6lightgrey
Accent foreground
#2e3d3edarkslategray
#2e3d3edarkslategray
Destructive
#74180bmaroon
#e93c25orangered
Destructive foreground
#f8c1b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c7d6d0lightgrey
#c7d6d0lightgrey

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button7.49:1AAA
Secondary button7.51:1AAA
Muted text7.50:1AAA
Accent7.50:1AAA
Destructive7.10:1AAA
Dark mode
Text on background18.89:1AAA
Text on card18.89:1AAA
Primary button7.49:1AAA
Secondary button7.51:1AAA
Muted text9.25:1AAA
Accent7.50:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 168.66);
  --foreground: oklch(0.125 0.018 169.011);
  --muted: oklch(0.945 0.019 147.349);
  --muted-foreground: oklch(0.408 0.026 146.901);
  --popover: oklch(0.994 0.003 168.66);
  --popover-foreground: oklch(0.125 0.018 169.011);
  --card: oklch(0.994 0.003 168.66);
  --card-foreground: oklch(0.125 0.018 169.011);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.863 0.018 168.142);
  --primary-foreground: oklch(0.346 0.024 166.604);
  --secondary: oklch(0.861 0.024 147.263);
  --secondary-foreground: oklch(0.343 0.033 146.529);
  --accent: oklch(0.863 0.015 202.037);
  --accent-foreground: oklch(0.345 0.02 201.711);
  --destructive: oklch(0.368 0.128 31.029);
  --destructive-foreground: oklch(0.858 0.065 27.129);
  --ring: oklch(0.863 0.018 168.142);
  --chart-1: oklch(0.863 0.018 168.142);
  --chart-2: oklch(0.861 0.024 147.263);
  --chart-3: oklch(0.863 0.015 202.037);
  --chart-4: oklch(0.883 0.02 147.316);
  --chart-5: oklch(0.865 0.021 168.024);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.011 168.881);
  --foreground: oklch(0.98 0.006 168.565);
  --muted: oklch(0.203 0.027 146.137);
  --muted-foreground: oklch(0.788 0.022 147.267);
  --popover: oklch(0.138 0.011 168.881);
  --popover-foreground: oklch(0.98 0.006 168.565);
  --card: oklch(0.138 0.011 168.881);
  --card-foreground: oklch(0.98 0.006 168.565);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.863 0.018 168.142);
  --primary-foreground: oklch(0.346 0.024 166.604);
  --secondary: oklch(0.861 0.024 147.263);
  --secondary-foreground: oklch(0.343 0.033 146.529);
  --accent: oklch(0.863 0.015 202.037);
  --accent-foreground: oklch(0.345 0.02 201.711);
  --destructive: oklch(0.617 0.213 31.013);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.863 0.018 168.142);
  --chart-1: oklch(0.863 0.018 168.142);
  --chart-2: oklch(0.861 0.024 147.263);
  --chart-3: oklch(0.863 0.015 202.037);
  --chart-4: oklch(0.883 0.02 147.316);
  --chart-5: oklch(0.865 0.021 168.024);
}