Public for shadcn/ui

Public is a shadcn/ui theme built around a light violet primary color (#c695ef) with light purple accents (#ef95eb). The light mode uses a neutral background (#faf8fc). Dark mode keeps the light violet primary (#c695ef) on a violet-tinted background (#0b070e).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#0b070eblack
Foreground
#030104black
#fdfcfdwhite
Card
#faf8fcghostwhite
#0b070eblack
Card foreground
#030104black
#fdfcfdwhite
Popover
#faf8fcghostwhite
#0b070eblack
Popover foreground
#030104black
#fdfcfdwhite
Primary
#c695efplum
#c695efplum
Primary foreground
#2c0b47midnightblue
#2c0b47midnightblue
Secondary
#9995efmediumpurple
#9995efmediumpurple
Secondary foreground
#0e0b47midnightblue
#0e0b47midnightblue
Muted
#dadae2gainsboro
#1e1d25black
Muted foreground
#3c3b4fdarkslategray
#b1b0c4silver
Accent
#ef95ebviolet
#ef95ebviolet
Accent foreground
#470b44indigo
#470b44indigo
Destructive
#932f10saddlebrown
#e75427chocolate
Destructive foreground
#fbe2damistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c695efplum
#c695efplum

Contrast

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

Light mode
Text on background19.70:1AAA
Text on card19.70:1AAA
Primary button7.16:1AAA
Secondary button6.79:1AA
Muted text7.82:1AAA
Accent7.24:1AAA
Destructive6.41:1AA
Dark mode
Text on background19.57:1AAA
Text on card19.57:1AAA
Primary button7.16:1AAA
Secondary button6.79:1AA
Muted text7.84:1AAA
Accent7.24:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 310.386);
  --foreground: oklch(0.079 0.023 312.692);
  --muted: oklch(0.891 0.011 288.482);
  --muted-foreground: oklch(0.36 0.035 286.763);
  --popover: oklch(0.982 0.005 310.386);
  --popover-foreground: oklch(0.079 0.023 312.692);
  --card: oklch(0.982 0.005 310.386);
  --card-foreground: oklch(0.079 0.023 312.692);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.749 0.136 308.678);
  --primary-foreground: oklch(0.243 0.105 304.484);
  --secondary: oklch(0.709 0.131 284.833);
  --secondary-foreground: oklch(0.208 0.106 274.242);
  --accent: oklch(0.789 0.153 328.68);
  --accent-foreground: oklch(0.286 0.114 330.318);
  --destructive: oklch(0.451 0.14 36.316);
  --destructive-foreground: oklch(0.931 0.03 37.626);
  --ring: oklch(0.749 0.136 308.678);
  --chart-1: oklch(0.749 0.136 308.678);
  --chart-2: oklch(0.709 0.131 284.833);
  --chart-3: oklch(0.789 0.153 328.68);
  --chart-4: oklch(0.745 0.113 285.589);
  --chart-5: oklch(0.747 0.142 308.595);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.018 310.279);
  --foreground: oklch(0.991 0.002 310.421);
  --muted: oklch(0.235 0.015 287.464);
  --muted-foreground: oklch(0.764 0.029 287.981);
  --popover: oklch(0.136 0.018 310.279);
  --popover-foreground: oklch(0.991 0.002 310.421);
  --card: oklch(0.136 0.018 310.279);
  --card-foreground: oklch(0.991 0.002 310.421);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.749 0.136 308.678);
  --primary-foreground: oklch(0.243 0.105 304.484);
  --secondary: oklch(0.709 0.131 284.833);
  --secondary-foreground: oklch(0.208 0.106 274.242);
  --accent: oklch(0.789 0.153 328.68);
  --accent-foreground: oklch(0.286 0.114 330.318);
  --destructive: oklch(0.638 0.191 36.673);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.749 0.136 308.678);
  --chart-1: oklch(0.749 0.136 308.678);
  --chart-2: oklch(0.709 0.131 284.833);
  --chart-3: oklch(0.789 0.153 328.68);
  --chart-4: oklch(0.745 0.113 285.589);
  --chart-5: oklch(0.747 0.142 308.595);
}