Ray for shadcn/ui

Ray is a shadcn/ui theme built around a vivid deep purple primary color (#69048b) with muted light purple accents (#dacfdd). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep purple primary (#69048b) on a purple-tinted background (#09050b).

Color palette

TokenLightDark
Background
#ffffffwhite
#09050bblack
Foreground
#000000black
#ffffffwhite
Card
#fcfcfcsnow
#0c060eblack
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#0c060eblack
Popover foreground
#000000black
#ffffffwhite
Primary
#69048bpurple
#69048bpurple
Primary foreground
#efc3fdlavender
#efc3fdlavender
Secondary
#dacfddlightgrey
#1c151eblack
Secondary foreground
#423348darkslategray
#b9a5c0silver
Muted
#eee3f2lavender
#180d1cblack
Muted foreground
#636363dimgray
#9c9c9cdarkgray
Accent
#dacfddlightgrey
#1c151eblack
Accent foreground
#423348darkslategray
#b9a5c0silver
Destructive
#9f2b04saddlebrown
#ea3f06orangered
Destructive foreground
#fee1d7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#69048bpurple
#69048bpurple

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button6.96:1AA
Secondary button7.76:1AAA
Muted text4.84:1AA
Accent7.76:1AAA
Destructive6.01:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.01:1AAA
Primary button6.96:1AA
Secondary button7.83:1AAA
Muted text6.87:1AA
Accent7.83:1AAA
Destructive4.03:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.93 0.023 317.723);
  --muted-foreground: oklch(0.501 0 180);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.394 0.192 314.016);
  --primary-foreground: oklch(0.875 0.091 317.587);
  --secondary: oklch(0.868 0.022 317.722);
  --secondary-foreground: oklch(0.346 0.041 317.559);
  --accent: oklch(0.868 0.022 317.722);
  --accent-foreground: oklch(0.346 0.041 317.559);
  --destructive: oklch(0.468 0.158 35.799);
  --destructive-foreground: oklch(0.931 0.035 39.322);
  --ring: oklch(0.394 0.192 314.016);
  --chart-1: oklch(0.394 0.192 314.016);
  --chart-2: oklch(0.868 0.022 317.722);
  --chart-3: oklch(0.868 0.022 317.722);
  --chart-4: oklch(0.893 0.018 317.731);
  --chart-5: oklch(0.396 0.195 313.818);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.018 319.031);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.182 0.034 317.409);
  --muted-foreground: oklch(0.691 0 180);
  --popover: oklch(0.138 0.021 318.108);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.021 318.108);
  --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.394 0.192 314.016);
  --primary-foreground: oklch(0.875 0.091 317.587);
  --secondary: oklch(0.208 0.021 317.596);
  --secondary-foreground: oklch(0.748 0.045 317.664);
  --accent: oklch(0.208 0.021 317.596);
  --accent-foreground: oklch(0.748 0.045 317.664);
  --destructive: oklch(0.619 0.214 35.105);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.394 0.192 314.016);
  --chart-1: oklch(0.394 0.192 314.016);
  --chart-2: oklch(0.208 0.021 317.596);
  --chart-3: oklch(0.208 0.021 317.596);
  --chart-4: oklch(0.239 0.026 317.579);
  --chart-5: oklch(0.396 0.195 313.818);
}