Hometown for shadcn/ui

Hometown is a shadcn/ui theme built around a light purple primary color (#f0dcf4) with light pink accents (#f4dcec). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the light purple primary (#f0dcf4) on a purple-tinted background (#0e0410).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0e0410black
Foreground
#0b030cblack
#fdfcfdwhite
Card
#fdfbfewhite
#0e0410black
Card foreground
#0b030cblack
#fdfcfdwhite
Popover
#fdfbfewhite
#0e0410black
Popover foreground
#0b030cblack
#fdfcfdwhite
Primary
#f0dcf4lavender
#f0dcf4lavender
Primary foreground
#6a2777rebeccapurple
#6a2777rebeccapurple
Secondary
#e4dcf4lavender
#e4dcf4lavender
Secondary foreground
#422777darkslateblue
#422777darkslateblue
Muted
#e2e2e4gainsboro
#1c1b1dblack
Muted foreground
#514b5ddarkslategray
#a8a2b4darkgray
Accent
#f4dcecmistyrose
#f4dcecmistyrose
Accent foreground
#77275cpurple
#77275cpurple
Destructive
#ae1c09firebrick
#f44a34tomato
Destructive foreground
#feeeecseashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f0dcf4lavender
#f0dcf4lavender

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button7.50:1AAA
Secondary button8.88:1AAA
Muted text6.44:1AA
Accent7.32:1AAA
Destructive6.25:1AA
Dark mode
Text on background19.62:1AAA
Text on card19.62:1AAA
Primary button7.50:1AAA
Secondary button8.88:1AAA
Muted text6.96:1AA
Accent7.32:1AAA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 320.539);
  --foreground: oklch(0.122 0.029 322.132);
  --muted: oklch(0.913 0.004 301.424);
  --muted-foreground: oklch(0.426 0.031 300.306);
  --popover: oklch(0.991 0.005 320.539);
  --popover-foreground: oklch(0.122 0.029 322.132);
  --card: oklch(0.991 0.005 320.539);
  --card-foreground: oklch(0.122 0.029 322.132);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.918 0.038 320.594);
  --primary-foreground: oklch(0.406 0.143 320.579);
  --secondary: oklch(0.909 0.033 300.915);
  --secondary-foreground: oklch(0.354 0.131 294.006);
  --accent: oklch(0.919 0.033 337.97);
  --accent-foreground: oklch(0.412 0.129 343.358);
  --destructive: oklch(0.484 0.182 30.914);
  --destructive-foreground: oklch(0.961 0.018 26.572);
  --ring: oklch(0.918 0.038 320.594);
  --chart-1: oklch(0.918 0.038 320.594);
  --chart-2: oklch(0.909 0.033 300.915);
  --chart-3: oklch(0.919 0.033 337.97);
  --chart-4: oklch(0.939 0.022 301.124);
  --chart-5: oklch(0.917 0.04 320.598);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.032 321.455);
  --foreground: oklch(0.992 0.002 320.535);
  --muted: oklch(0.223 0.006 301.092);
  --muted-foreground: oklch(0.722 0.027 300.883);
  --popover: oklch(0.135 0.032 321.455);
  --popover-foreground: oklch(0.992 0.002 320.535);
  --card: oklch(0.135 0.032 321.455);
  --card-foreground: oklch(0.992 0.002 320.535);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.918 0.038 320.594);
  --primary-foreground: oklch(0.406 0.143 320.579);
  --secondary: oklch(0.909 0.033 300.915);
  --secondary-foreground: oklch(0.354 0.131 294.006);
  --accent: oklch(0.919 0.033 337.97);
  --accent-foreground: oklch(0.412 0.129 343.358);
  --destructive: oklch(0.65 0.21 30.837);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.918 0.038 320.594);
  --chart-1: oklch(0.918 0.038 320.594);
  --chart-2: oklch(0.909 0.033 300.915);
  --chart-3: oklch(0.919 0.033 337.97);
  --chart-4: oklch(0.939 0.022 301.124);
  --chart-5: oklch(0.917 0.04 320.598);
}