Scale for shadcn/ui

Scale is a shadcn/ui theme built around a deep violet primary color (#501679) with deep teal accents (#167950). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#501679) on a violet-tinted background (#0b070d).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b070dblack
Foreground
#060209black
#f8f6f9whitesmoke
Card
#fcfcfcsnow
#0d0911black
Card foreground
#030104black
#faf9fbghostwhite
Popover
#ffffffwhite
#0b070dblack
Popover foreground
#060209black
#f8f6f9whitesmoke
Primary
#501679indigo
#501679indigo
Primary foreground
#e4cbf6lavender
#e4cbf6lavender
Secondary
#795016saddlebrown
#795016saddlebrown
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e8dbc9gainsboro
#362917darkslategray
Muted foreground
#655d53dimgray
#aca59adarkgray
Accent
#167950seagreen
#167950seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#660505maroon
#f52e2ecrimson
Destructive foreground
#fba2a2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#501679indigo
#501679indigo

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 button8.20:1AAA
Secondary button7.10:1AAA
Muted text4.76:1AA
Accent5.42:1AA
Destructive6.78:1AA
Dark mode
Text on background18.60:1AAA
Text on card18.80:1AAA
Primary button8.20:1AAA
Secondary button7.10:1AAA
Muted text5.80:1AA
Accent5.42:1AA
Destructive3.95:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.1 0.029 314.066);
  --muted: oklch(0.898 0.028 76.474);
  --muted-foreground: oklch(0.483 0.019 76.401);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.1 0.029 314.066);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.079 0.023 314.066);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.351 0.155 306.108);
  --primary-foreground: oklch(0.877 0.063 311.147);
  --secondary: oklch(0.465 0.089 70.546);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.51 0.109 159.638);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.325 0.128 28.389);
  --destructive-foreground: oklch(0.801 0.105 19.639);
  --ring: oklch(0.351 0.155 306.108);
  --chart-1: oklch(0.351 0.155 306.108);
  --chart-2: oklch(0.465 0.089 70.546);
  --chart-3: oklch(0.51 0.109 159.638);
  --chart-4: oklch(0.5 0.097 70.348);
  --chart-5: oklch(0.352 0.16 305.728);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.016 311.617);
  --foreground: oklch(0.975 0.004 311.691);
  --muted: oklch(0.29 0.035 75.002);
  --muted-foreground: oklch(0.724 0.018 76.521);
  --popover: oklch(0.138 0.016 311.617);
  --popover-foreground: oklch(0.975 0.004 311.691);
  --card: oklch(0.149 0.018 310.824);
  --card-foreground: oklch(0.983 0.003 311.703);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.351 0.155 306.108);
  --primary-foreground: oklch(0.877 0.063 311.147);
  --secondary: oklch(0.465 0.089 70.546);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.51 0.109 159.638);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.628 0.232 27.189);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.351 0.155 306.108);
  --chart-1: oklch(0.351 0.155 306.108);
  --chart-2: oklch(0.465 0.089 70.546);
  --chart-3: oklch(0.51 0.109 159.638);
  --chart-4: oklch(0.5 0.097 70.348);
  --chart-5: oklch(0.352 0.16 305.728);
}