Rye for shadcn/ui

Rye is a shadcn/ui theme built around a light violet primary color (#d5c0dd) with light green accents (#c8ddc0). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#d5c0dd) on a violet-tinted background (#0c070e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c070eblack
Foreground
#060208black
#fbf8fcghostwhite
Card
#fcfcfcsnow
#0f0811black
Card foreground
#030104black
#fdfbfdsnow
Popover
#fcfcfcsnow
#0f0811black
Popover foreground
#030104black
#fdfbfdsnow
Primary
#d5c0ddthistle
#d5c0ddthistle
Primary foreground
#3d2546darkslategray
#3d2546darkslategray
Secondary
#c8ddc0lightgrey
#c8ddc0lightgrey
Secondary foreground
#2f4625darkslategray
#2f4625darkslategray
Muted
#d2e8c9lightgrey
#203617darkgreen
Muted foreground
#464a45darkslategray
#b7bab5silver
Accent
#c8ddc0lightgrey
#c8ddc0lightgrey
Accent foreground
#2f4625darkslategray
#2f4625darkslategray
Destructive
#903304saddlebrown
#fa7533tomato
Destructive foreground
#fedac8bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d5c0ddthistle
#d5c0ddthistle

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.34:1AAA
Primary button7.99:1AAA
Secondary button7.20:1AAA
Muted text6.93:1AA
Accent7.20:1AAA
Destructive6.05:1AA
Dark mode
Text on background18.98:1AAA
Text on card19.16:1AAA
Primary button7.99:1AAA
Secondary button7.20:1AAA
Muted text6.72:1AA
Accent7.20:1AAA
Destructive7.66:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.105 0.023 318.502);
  --muted: oklch(0.907 0.047 136.771);
  --muted-foreground: oklch(0.403 0.008 136.669);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.084 0.018 318.502);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.084 0.018 318.502);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.834 0.046 316.448);
  --primary-foreground: oklch(0.31 0.063 315.937);
  --secondary: oklch(0.874 0.045 136.77);
  --secondary-foreground: oklch(0.364 0.06 137.268);
  --accent: oklch(0.874 0.045 136.77);
  --accent-foreground: oklch(0.364 0.06 137.268);
  --destructive: oklch(0.45 0.136 40.935);
  --destructive-foreground: oklch(0.914 0.046 48.19);
  --ring: oklch(0.834 0.046 316.448);
  --chart-1: oklch(0.834 0.046 316.448);
  --chart-2: oklch(0.874 0.045 136.77);
  --chart-3: oklch(0.874 0.045 136.77);
  --chart-4: oklch(0.894 0.038 136.739);
  --chart-5: oklch(0.832 0.05 316.432);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.019 316.815);
  --foreground: oklch(0.982 0.006 316.591);
  --muted: oklch(0.304 0.059 137.466);
  --muted-foreground: oklch(0.784 0.007 136.635);
  --popover: oklch(0.15 0.022 316.287);
  --popover-foreground: oklch(0.991 0.003 316.6);
  --card: oklch(0.15 0.022 316.287);
  --card-foreground: oklch(0.991 0.003 316.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.834 0.046 316.448);
  --primary-foreground: oklch(0.31 0.063 315.937);
  --secondary: oklch(0.874 0.045 136.77);
  --secondary-foreground: oklch(0.364 0.06 137.268);
  --accent: oklch(0.874 0.045 136.77);
  --accent-foreground: oklch(0.364 0.06 137.268);
  --destructive: oklch(0.711 0.179 44.186);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.834 0.046 316.448);
  --chart-1: oklch(0.834 0.046 316.448);
  --chart-2: oklch(0.874 0.045 136.77);
  --chart-3: oklch(0.874 0.045 136.77);
  --chart-4: oklch(0.894 0.038 136.739);
  --chart-5: oklch(0.832 0.05 316.432);
}