Acrylic for shadcn/ui

Acrylic is a shadcn/ui theme built around a light blue primary color (#9ea8eb) with light violet accents (#ba9eeb). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the light blue primary (#9ea8eb) on a blue-tinted background (#03050c).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#03050cblack
Foreground
#000000black
#f5f6fawhitesmoke
Card
#fbfbfeghostwhite
#03050cblack
Card foreground
#000000black
#f5f6fawhitesmoke
Popover
#fbfbfeghostwhite
#03050cblack
Popover foreground
#000000black
#f5f6fawhitesmoke
Primary
#9ea8eblightsteelblue
#9ea8eblightsteelblue
Primary foreground
#0f1648midnightblue
#0f1648midnightblue
Secondary
#9ecfeblightblue
#9ecfeblightblue
Secondary foreground
#0f3348darkslategray
#0f3348darkslategray
Muted
#d7d9dbgainsboro
#242728darkslategray
Muted foreground
#555758dimgray
#a7a9aadarkgray
Accent
#ba9eebplum
#ba9eebplum
Accent foreground
#240f48midnightblue
#240f48midnightblue
Destructive
#d01201firebrick
#fe2410orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9ea8eblightsteelblue
#9ea8eblightsteelblue

Contrast

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

Light mode
Text on background20.34:1AAA
Text on card20.34:1AAA
Primary button7.52:1AAA
Secondary button7.89:1AAA
Muted text5.13:1AA
Accent7.40:1AAA
Destructive5.56:1AA
Dark mode
Text on background18.88:1AAA
Text on card18.88:1AAA
Primary button7.52:1AAA
Secondary button7.89:1AAA
Muted text6.38:1AA
Accent7.40:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 279.279);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.885 0.003 232.632);
  --muted-foreground: oklch(0.456 0.003 232.688);
  --popover: oklch(0.989 0.004 279.279);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.989 0.004 279.279);
  --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.749 0.097 277.04);
  --primary-foreground: oklch(0.233 0.092 270.627);
  --secondary: oklch(0.829 0.065 233.968);
  --secondary-foreground: oklch(0.306 0.056 238.043);
  --accent: oklch(0.752 0.113 300.568);
  --accent-foreground: oklch(0.239 0.1 294.333);
  --destructive: oklch(0.543 0.216 30.129);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.749 0.097 277.04);
  --chart-1: oklch(0.749 0.097 277.04);
  --chart-2: oklch(0.829 0.065 233.968);
  --chart-3: oklch(0.752 0.113 300.568);
  --chart-4: oklch(0.851 0.056 233.703);
  --chart-5: oklch(0.746 0.102 276.907);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.115 0.02 273.236);
  --foreground: oklch(0.973 0.006 279.256);
  --muted: oklch(0.27 0.004 232.813);
  --muted-foreground: oklch(0.733 0.003 232.639);
  --popover: oklch(0.115 0.02 273.236);
  --popover-foreground: oklch(0.973 0.006 279.256);
  --card: oklch(0.115 0.02 273.236);
  --card-foreground: oklch(0.973 0.006 279.256);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.749 0.097 277.04);
  --primary-foreground: oklch(0.233 0.092 270.627);
  --secondary: oklch(0.829 0.065 233.968);
  --secondary-foreground: oklch(0.306 0.056 238.043);
  --accent: oklch(0.752 0.113 300.568);
  --accent-foreground: oklch(0.239 0.1 294.333);
  --destructive: oklch(0.636 0.247 30.083);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.749 0.097 277.04);
  --chart-1: oklch(0.749 0.097 277.04);
  --chart-2: oklch(0.829 0.065 233.968);
  --chart-3: oklch(0.752 0.113 300.568);
  --chart-4: oklch(0.851 0.056 233.703);
  --chart-5: oklch(0.746 0.102 276.907);
}