Rare for shadcn/ui

Rare is a shadcn/ui theme built around a vivid deep teal primary color (#017a57) with vivid deep cyan accents (#01607a). The light mode uses a neutral background (#fbfefd). Dark mode keeps the vivid deep teal primary (#017a57) on a teal-tinted background (#050f0c).

Color palette

TokenLightDark
Background
#fbfefdwhite
#050f0cblack
Foreground
#03110dblack
#ffffffwhite
Card
#fbfefdwhite
#050f0cblack
Card foreground
#03110dblack
#ffffffwhite
Popover
#fbfefdwhite
#050f0cblack
Popover foreground
#03110dblack
#ffffffwhite
Primary
#017a57teal
#017a57teal
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#017a1bgreen
#017a1bgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e3ede5gainsboro
#121c14black
Muted foreground
#405444darkslategray
#abbfafdarkgray
Accent
#01607ateal
#01607ateal
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#de4c02orangered
#fd6a21tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#017a57teal
#017a57teal

Contrast

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

Light mode
Text on background18.97:1AAA
Text on card18.97:1AAA
Primary button5.36:1AA
Secondary button5.54:1AA
Muted text6.82:1AA
Accent7.15:1AAA
Destructive4.09:1AA Large
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button5.36:1AA
Secondary button5.54:1AA
Muted text8.98:1AAA
Accent7.15:1AAA
Destructive7.25:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 177.619);
  --foreground: oklch(0.163 0.024 174.691);
  --muted: oklch(0.937 0.015 152.364);
  --muted-foreground: oklch(0.425 0.037 151.158);
  --popover: oklch(0.994 0.003 177.619);
  --popover-foreground: oklch(0.163 0.024 174.691);
  --card: oklch(0.994 0.003 177.619);
  --card-foreground: oklch(0.163 0.024 174.691);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.513 0.107 165.182);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.503 0.16 144.56);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.453 0.086 224.913);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.612 0.194 39.384);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.513 0.107 165.182);
  --chart-1: oklch(0.513 0.107 165.182);
  --chart-2: oklch(0.503 0.16 144.56);
  --chart-3: oklch(0.453 0.086 224.913);
  --chart-4: oklch(0.547 0.175 144.428);
  --chart-5: oklch(0.518 0.109 164.895);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.018 175.431);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.214 0.021 150.925);
  --muted-foreground: oklch(0.786 0.032 151.96);
  --popover: oklch(0.158 0.018 175.431);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.158 0.018 175.431);
  --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.513 0.107 165.182);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.503 0.16 144.56);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.453 0.086 224.913);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.699 0.195 42.578);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.513 0.107 165.182);
  --chart-1: oklch(0.513 0.107 165.182);
  --chart-2: oklch(0.503 0.16 144.56);
  --chart-3: oklch(0.453 0.086 224.913);
  --chart-4: oklch(0.547 0.175 144.428);
  --chart-5: oklch(0.518 0.109 164.895);
}