Elated for shadcn/ui

Elated is a shadcn/ui theme built around a near-black primary color (#000000) with muted light red accents (#e1dbdb). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000000) on a red-tinted background (#0c0303).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c0303black
Foreground
#140505black
#faf5f5whitesmoke
Card
#fcfcfcsnow
#100404black
Card foreground
#100404black
#fbf8f8snow
Popover
#fcfcfcsnow
#100404black
Popover foreground
#100404black
#fbf8f8snow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#ebeaealinen
#1c1212black
Secondary foreground
#525151darkslategray
#c0a0a0rosybrown
Muted
#f2e8e8linen
#170d0dblack
Muted foreground
#4a3a3adarkslategray
#c5b5b5silver
Accent
#e1dbdbgainsboro
#3a2222darkslategray
Accent foreground
#4a3f3fdarkslategray
#d6b8b8silver
Destructive
#a3190ffirebrick
#ed4b40tomato
Destructive foreground
#fde9e8linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background19.93:1AAA
Text on card19.73:1AAA
Primary button7.37:1AAA
Secondary button6.60:1AA
Muted text8.94:1AAA
Accent7.40:1AAA
Destructive6.63:1AA
Dark mode
Text on background18.85:1AAA
Text on card19.06:1AAA
Primary button7.37:1AAA
Secondary button7.65:1AAA
Muted text9.69:1AAA
Accent7.99:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.144 0.029 21.284);
  --muted: oklch(0.939 0.011 17.35);
  --muted-foreground: oklch(0.367 0.023 18.229);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.132 0.025 21.016);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.132 0.025 21.016);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.939 0 17.166);
  --secondary-foreground: oklch(0.436 0.002 17.239);
  --accent: oklch(0.896 0.006 17.265);
  --accent-foreground: oklch(0.38 0.015 17.844);
  --destructive: oklch(0.461 0.174 29.602);
  --destructive-foreground: oklch(0.95 0.022 22.482);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.939 0 17.166);
  --chart-3: oklch(0.896 0.006 17.265);
  --chart-4: oklch(0.962 0 17.163);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.021 20.72);
  --foreground: oklch(0.974 0.005 17.241);
  --muted: oklch(0.172 0.017 18.997);
  --muted-foreground: oklch(0.786 0.018 17.547);
  --popover: oklch(0.132 0.024 20.908);
  --popover-foreground: oklch(0.983 0.003 17.213);
  --card: oklch(0.132 0.024 20.908);
  --card-foreground: oklch(0.983 0.003 17.213);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.196 0.015 18.55);
  --secondary-foreground: oklch(0.734 0.037 18.038);
  --accent: oklch(0.282 0.038 19.747);
  --accent-foreground: oklch(0.808 0.035 17.897);
  --destructive: oklch(0.64 0.2 28.176);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.196 0.015 18.55);
  --chart-3: oklch(0.282 0.038 19.747);
  --chart-4: oklch(0.227 0.02 18.723);
  --chart-5: oklch(0 0 0);
}