Score for shadcn/ui

Score is a shadcn/ui theme built around a purple primary color (#a72a97) with pink accents (#a72a58). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the purple primary (#a72a97) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#000000black
Foreground
#140612black
#fbf9fbsnow
Card
#fdf7fcsnow
#000000black
Card foreground
#140612black
#fbf9fbsnow
Popover
#fdf7fcsnow
#000000black
Popover foreground
#140612black
#fbf9fbsnow
Primary
#a72a97mediumvioletred
#a72a97mediumvioletred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#792aa7rebeccapurple
#792aa7rebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efe7f3lavender
#130c18black
Muted foreground
#4f4d51darkslategray
#b0aeb2darkgray
Accent
#a72a58brown
#a72a58brown
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#611c05maroon
#f34e16orangered
Destructive foreground
#fab59elightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a72a97mediumvioletred
#a72a97mediumvioletred

Contrast

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

Light mode
Text on background18.66:1AAA
Text on card18.66:1AAA
Primary button6.13:1AA
Secondary button7.76:1AAA
Muted text6.93:1AA
Accent6.73:1AA
Destructive7.26:1AAA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button6.13:1AA
Secondary button7.76:1AAA
Muted text8.71:1AAA
Accent6.73:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.01 329.803);
  --foreground: oklch(0.151 0.034 331.985);
  --muted: oklch(0.938 0.017 313.494);
  --muted-foreground: oklch(0.425 0.006 313.522);
  --popover: oklch(0.982 0.01 329.803);
  --popover-foreground: oklch(0.151 0.034 331.985);
  --card: oklch(0.982 0.01 329.803);
  --card-foreground: oklch(0.151 0.034 331.985);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.521 0.198 334.121);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.192 309.683);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.495 0.164 3.44);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.335 0.105 37.305);
  --destructive-foreground: oklch(0.832 0.087 39.213);
  --ring: oklch(0.521 0.198 334.121);
  --chart-1: oklch(0.521 0.198 334.121);
  --chart-2: oklch(0.465 0.192 309.683);
  --chart-3: oklch(0.495 0.164 3.44);
  --chart-4: oklch(0.488 0.203 309.634);
  --chart-5: oklch(0.525 0.204 334.284);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.003 329.723);
  --muted: oklch(0.171 0.026 312.656);
  --muted-foreground: oklch(0.755 0.005 313.565);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.003 329.723);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.984 0.003 329.723);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.521 0.198 334.121);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.192 309.683);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.495 0.164 3.44);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.21 36.45);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.521 0.198 334.121);
  --chart-1: oklch(0.521 0.198 334.121);
  --chart-2: oklch(0.465 0.192 309.683);
  --chart-3: oklch(0.495 0.164 3.44);
  --chart-4: oklch(0.488 0.203 309.634);
  --chart-5: oklch(0.525 0.204 334.284);
}