Ragged for shadcn/ui

Ragged is a shadcn/ui theme built around a muted indigo primary color (#7a7891) with muted yellow accents (#8f9178). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the muted indigo primary (#7a7891) on an indigo-tinted background (#050410).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#050410black
Foreground
#000000black
#f8f8fcghostwhite
Card
#f7f7fdghostwhite
#050410black
Card foreground
#000000black
#f8f8fcghostwhite
Popover
#f7f7fdghostwhite
#050410black
Popover foreground
#000000black
#f8f8fcghostwhite
Primary
#7a7891slategray
#7a7891slategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8f9178gray
#8f9178gray
Secondary foreground
#000000black
#000000black
Muted
#e4e5e1gainsboro
#1e1e1ablack
Muted foreground
#4e4f40darkolivegreen
#bebfb0silver
Accent
#8f9178gray
#8f9178gray
Accent foreground
#000000black
#000000black
Destructive
#db2906orangered
#fa5433tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7a7891slategray
#7a7891slategray

Contrast

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

Light mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button4.25:1AA Large
Secondary button6.48:1AA
Muted text6.58:1AA
Accent6.48:1AA
Destructive4.85:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button4.25:1AA Large
Secondary button6.48:1AA
Muted text9.00:1AAA
Accent6.48:1AA
Destructive6.37:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.977 0.009 289.312);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.92 0.005 109.57);
  --muted-foreground: oklch(0.421 0.023 110.472);
  --popover: oklch(0.977 0.009 289.312);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.977 0.009 289.312);
  --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.584 0.037 288.245);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.648 0.035 110.471);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.648 0.035 110.471);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.575 0.215 32.02);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.584 0.037 288.245);
  --chart-1: oklch(0.584 0.037 288.245);
  --chart-2: oklch(0.648 0.035 110.471);
  --chart-3: oklch(0.648 0.035 110.471);
  --chart-4: oklch(0.671 0.033 110.373);
  --chart-5: oklch(0.575 0.049 287.82);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.029 285.285);
  --foreground: oklch(0.981 0.005 289.388);
  --muted: oklch(0.232 0.006 109.981);
  --muted-foreground: oklch(0.799 0.02 109.934);
  --popover: oklch(0.12 0.029 285.285);
  --popover-foreground: oklch(0.981 0.005 289.388);
  --card: oklch(0.12 0.029 285.285);
  --card-foreground: oklch(0.981 0.005 289.388);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.584 0.037 288.245);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.648 0.035 110.471);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.648 0.035 110.471);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.669 0.207 33.2);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.584 0.037 288.245);
  --chart-1: oklch(0.584 0.037 288.245);
  --chart-2: oklch(0.648 0.035 110.471);
  --chart-3: oklch(0.648 0.035 110.471);
  --chart-4: oklch(0.671 0.033 110.373);
  --chart-5: oklch(0.575 0.049 287.82);
}