Glue for shadcn/ui

Glue is a shadcn/ui theme built around a deep violet primary color (#481c59) with muted light violet accents (#e0d8e3). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#481c59) on a violet-tinted background (#09040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#09040bblack
Foreground
#030104black
#fbf8fbsnow
Card
#fcfcfcsnow
#0c060fblack
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#09040bblack
Popover foreground
#030104black
#fbf8fbsnow
Primary
#481c59indigo
#481c59indigo
Primary foreground
#ddbdeathistle
#ddbdeathistle
Secondary
#e0d8e3gainsboro
#28212bdarkslategray
Secondary foreground
#4a3951darkslategray
#c3b7c8silver
Muted
#dcdaddgainsboro
#242225black
Muted foreground
#666666dimgray
#999999darkgray
Accent
#e0d8e3gainsboro
#28212bdarkslategray
Accent foreground
#4a3951darkslategray
#c3b7c8silver
Destructive
#8f1c0fdarkred
#e7311dorangered
Destructive foreground
#fbd9d5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#481c59indigo
#481c59indigo

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.54:1AAA
Primary button7.90:1AAA
Secondary button7.58:1AAA
Muted text4.12:1AA Large
Accent7.58:1AAA
Destructive6.83:1AA
Dark mode
Text on background19.23:1AAA
Text on card19.58:1AAA
Primary button7.90:1AAA
Secondary button8.10:1AAA
Muted text5.53:1AA
Accent8.10:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.081 0.023 319.012);
  --muted: oklch(0.89 0.006 316.59);
  --muted-foreground: oklch(0.51 0 171.87);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.081 0.023 319.012);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.322 0.111 315.057);
  --primary-foreground: oklch(0.841 0.071 316.362);
  --secondary: oklch(0.893 0.018 316.551);
  --secondary-foreground: oklch(0.373 0.045 316.249);
  --accent: oklch(0.893 0.018 316.551);
  --accent-foreground: oklch(0.373 0.045 316.249);
  --destructive: oklch(0.424 0.152 30.479);
  --destructive-foreground: oklch(0.913 0.038 25.38);
  --ring: oklch(0.322 0.111 315.057);
  --chart-1: oklch(0.322 0.111 315.057);
  --chart-2: oklch(0.893 0.018 316.551);
  --chart-3: oklch(0.893 0.018 316.551);
  --chart-4: oklch(0.918 0.013 316.566);
  --chart-5: oklch(0.322 0.116 314.904);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.02 317.974);
  --foreground: oklch(0.983 0.005 316.595);
  --muted: oklch(0.256 0.008 316.522);
  --muted-foreground: oklch(0.683 0 180);
  --popover: oklch(0.123 0.02 317.974);
  --popover-foreground: oklch(0.983 0.005 316.595);
  --card: oklch(0.136 0.023 316.906);
  --card-foreground: oklch(0.991 0.002 316.602);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.322 0.111 315.057);
  --primary-foreground: oklch(0.841 0.071 316.362);
  --secondary: oklch(0.261 0.021 316.374);
  --secondary-foreground: oklch(0.794 0.027 316.511);
  --accent: oklch(0.261 0.021 316.374);
  --accent-foreground: oklch(0.794 0.027 316.511);
  --destructive: oklch(0.604 0.219 30.501);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.322 0.111 315.057);
  --chart-1: oklch(0.322 0.111 315.057);
  --chart-2: oklch(0.261 0.021 316.374);
  --chart-3: oklch(0.261 0.021 316.374);
  --chart-4: oklch(0.291 0.024 316.362);
  --chart-5: oklch(0.322 0.116 314.904);
}