Sociable for shadcn/ui

Sociable is a shadcn/ui theme built around a deep violet primary color (#0c0515) with muted light violet accents (#d6cede). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#0c0515) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#050209black
#fcfcfdwhite
Card
#ffffffwhite
#050307black
Card foreground
#050209black
#fcfcfdwhite
Popover
#ffffffwhite
#050307black
Popover foreground
#050209black
#fcfcfdwhite
Primary
#0c0515black
#0c0515black
Primary foreground
#d8c1f0thistle
#d8c1f0thistle
Secondary
#d6cedelightgrey
#292131darkslategray
Secondary foreground
#3d3149darkslategray
#c1b6cesilver
Muted
#e8e4eclavender
#17131bblack
Muted foreground
#5b4e6adimgray
#a395b1darkgray
Accent
#d6cedelightgrey
#292131darkslategray
Accent foreground
#3d3149darkslategray
#c1b6cesilver
Destructive
#9a1d04darkred
#f92f06orangered
Destructive foreground
#fedad2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c0515black
#0c0515black

Contrast

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

Light mode
Text on background20.60:1AAA
Text on card20.60:1AAA
Primary button12.21:1AAA
Secondary button7.92:1AAA
Muted text6.09:1AA
Accent7.92:1AAA
Destructive6.33:1AA
Dark mode
Text on background20.03:1AAA
Text on card20.03:1AAA
Primary button12.21:1AAA
Secondary button8.03:1AAA
Muted text6.54:1AA
Accent8.03:1AAA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.028 309.73);
  --muted: oklch(0.924 0.012 307.639);
  --muted-foreground: oklch(0.448 0.047 306.556);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.028 309.73);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.098 0.028 309.73);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.138 0.037 305.971);
  --primary-foreground: oklch(0.846 0.068 306.847);
  --secondary: oklch(0.863 0.024 307.467);
  --secondary-foreground: oklch(0.337 0.045 306.214);
  --accent: oklch(0.863 0.024 307.467);
  --accent-foreground: oklch(0.337 0.045 306.214);
  --destructive: oklch(0.446 0.164 32.451);
  --destructive-foreground: oklch(0.915 0.042 31.2);
  --ring: oklch(0.138 0.037 305.971);
  --chart-1: oklch(0.138 0.037 305.971);
  --chart-2: oklch(0.863 0.024 307.467);
  --chart-3: oklch(0.863 0.024 307.467);
  --chart-4: oklch(0.889 0.019 307.537);
  --chart-5: oklch(0.137 0.039 305.937);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.017 308.888);
  --foreground: oklch(0.991 0.003 307.758);
  --muted: oklch(0.195 0.017 306.742);
  --muted-foreground: oklch(0.692 0.042 307.075);
  --popover: oklch(0.105 0.017 308.888);
  --popover-foreground: oklch(0.991 0.003 307.758);
  --card: oklch(0.105 0.017 308.888);
  --card-foreground: oklch(0.991 0.003 307.758);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.138 0.037 305.971);
  --primary-foreground: oklch(0.846 0.068 306.847);
  --secondary: oklch(0.263 0.032 306.361);
  --secondary-foreground: oklch(0.792 0.036 307.253);
  --accent: oklch(0.263 0.032 306.361);
  --accent-foreground: oklch(0.792 0.036 307.253);
  --destructive: oklch(0.632 0.238 31.903);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.138 0.037 305.971);
  --chart-1: oklch(0.138 0.037 305.971);
  --chart-2: oklch(0.263 0.032 306.361);
  --chart-3: oklch(0.263 0.032 306.361);
  --chart-4: oklch(0.291 0.037 306.295);
  --chart-5: oklch(0.137 0.039 305.937);
}