Rosé Pine for shadcn/ui

Rosé Pine is a shadcn/ui theme built around a light indigo primary color (#deddf4) with muted deep indigo accents (#3a3654). The light mode uses an indigo-tinted background (#1a1825). Dark mode keeps the light indigo primary (#deddf4) on an indigo-tinted background (#1a1825).

Color palette

TokenLightDark
Background
#1a1825black
#1a1825black
Foreground
#deddf4lavender
#deddf4lavender
Card
#16141fblack
#16141fblack
Card foreground
#f1f0fawhitesmoke
#f1f0fawhitesmoke
Popover
#13121cblack
#13121cblack
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#deddf4lavender
#deddf4lavender
Primary foreground
#2e2877midnightblue
#2e2877midnightblue
Secondary
#302d53darkslategray
#302d53darkslategray
Secondary foreground
#cfcde4lightgrey
#cfcde4lightgrey
Muted
#25242edarkslategray
#25242edarkslategray
Muted foreground
#a19eb3darkgray
#a19eb3darkgray
Accent
#3a3654darkslategray
#3a3654darkslategray
Accent foreground
#d9d7e5gainsboro
#d9d7e5gainsboro
Destructive
#eb4a47tomato
#eb4a47tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#282631darkslategray
#282631darkslategray
Input
#2f2d39darkslategray
#2f2d39darkslategray
Ring
#deddf4lavender
#deddf4lavender

Contrast

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

Light mode
Text on background13.12:1AAA
Text on card16.12:1AAA
Primary button9.32:1AAA
Secondary button8.34:1AAA
Muted text5.88:1AA
Accent8.08:1AAA
Destructive3.75:1AA Large
Dark mode
Text on background13.12:1AAA
Text on card16.12:1AAA
Primary button9.32:1AAA
Secondary button8.34:1AAA
Muted text5.88:1AA
Accent8.08:1AAA
Destructive3.75:1AA Large

CSS variables

Paste this into your globals.css to use Rosé Pine in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.217 0.026 290.923);
  --foreground: oklch(0.905 0.031 289.589);
  --muted: oklch(0.266 0.018 291.993);
  --muted-foreground: oklch(0.708 0.03 292.497);
  --popover: oklch(0.189 0.02 291.185);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.198 0.022 291.087);
  --card-foreground: oklch(0.958 0.014 289.978);
  --border: oklch(0.275 0.019 291.971);
  --input: oklch(0.304 0.022 291.914);
  --primary: oklch(0.905 0.031 289.589);
  --primary-foreground: oklch(0.335 0.13 280.504);
  --secondary: oklch(0.319 0.067 285.741);
  --secondary-foreground: oklch(0.858 0.032 289.543);
  --accent: oklch(0.35 0.052 290.307);
  --accent-foreground: oklch(0.884 0.02 292.88);
  --destructive: oklch(0.636 0.198 25.575);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.905 0.031 289.589);
  --chart-1: oklch(0.905 0.031 289.589);
  --chart-2: oklch(0.319 0.067 285.741);
  --chart-3: oklch(0.35 0.052 290.307);
  --chart-4: oklch(0.343 0.074 285.622);
  --chart-5: oklch(0.903 0.033 289.547);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.217 0.026 290.923);
  --foreground: oklch(0.905 0.031 289.589);
  --muted: oklch(0.266 0.018 291.993);
  --muted-foreground: oklch(0.708 0.03 292.497);
  --popover: oklch(0.189 0.02 291.185);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.198 0.022 291.087);
  --card-foreground: oklch(0.958 0.014 289.978);
  --border: oklch(0.275 0.019 291.971);
  --input: oklch(0.304 0.022 291.914);
  --primary: oklch(0.905 0.031 289.589);
  --primary-foreground: oklch(0.335 0.13 280.504);
  --secondary: oklch(0.319 0.067 285.741);
  --secondary-foreground: oklch(0.858 0.032 289.543);
  --accent: oklch(0.35 0.052 290.307);
  --accent-foreground: oklch(0.884 0.02 292.88);
  --destructive: oklch(0.636 0.198 25.575);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.905 0.031 289.589);
  --chart-1: oklch(0.905 0.031 289.589);
  --chart-2: oklch(0.319 0.067 285.741);
  --chart-3: oklch(0.35 0.052 290.307);
  --chart-4: oklch(0.343 0.074 285.622);
  --chart-5: oklch(0.903 0.033 289.547);
}