Collection for shadcn/ui

Collection is a shadcn/ui theme built around a blue primary color (#354564) with muted blue accents (#a1aec9). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#354564) on a blue-tinted background (#07090e).

Color palette

TokenLightDark
Background
#ffffffwhite
#07090eblack
Foreground
#000000black
#f6f7f8whitesmoke
Card
#ffffffwhite
#07090eblack
Card foreground
#000000black
#f6f7f8whitesmoke
Popover
#ffffffwhite
#07090eblack
Popover foreground
#000000black
#f6f7f8whitesmoke
Primary
#354564darkslategray
#354564darkslategray
Primary foreground
#dee3edlavender
#dee3edlavender
Secondary
#c2c9d6lightgrey
#181b20black
Secondary foreground
#29303ddarkslategray
#abb2bfdarkgray
Muted
#e7e8e9lavender
#161618black
Muted foreground
#3b404adarkslategray
#b5bac4silver
Accent
#a1aec9darkgray
#29303ddarkslategray
Accent foreground
#141a24black
#c2c9d6lightgrey
Destructive
#772603maroon
#f9611fchocolate
Destructive foreground
#fdc7afpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#354564darkslategray
#354564darkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.49:1AAA
Secondary button7.95:1AAA
Muted text8.45:1AAA
Accent7.85:1AAA
Destructive6.75:1AA
Dark mode
Text on background18.57:1AAA
Text on card18.57:1AAA
Primary button7.49:1AAA
Secondary button8.11:1AAA
Muted text9.25:1AAA
Accent7.99:1AAA
Destructive6.75:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.93 0.003 264.542);
  --muted-foreground: oklch(0.37 0.018 264.328);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.39 0.058 263.56);
  --primary-foreground: oklch(0.914 0.015 264.491);
  --secondary: oklch(0.834 0.019 264.463);
  --secondary-foreground: oklch(0.308 0.025 264.105);
  --accent: oklch(0.751 0.041 264.288);
  --accent-foreground: oklch(0.215 0.021 263.967);
  --destructive: oklch(0.389 0.121 39.403);
  --destructive-foreground: oklch(0.871 0.07 44.341);
  --ring: oklch(0.39 0.058 263.56);
  --chart-1: oklch(0.39 0.058 263.56);
  --chart-2: oklch(0.834 0.019 264.463);
  --chart-3: oklch(0.751 0.041 264.288);
  --chart-4: oklch(0.859 0.016 264.482);
  --chart-5: oklch(0.388 0.063 263.427);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.011 261.498);
  --foreground: oklch(0.976 0.002 264.544);
  --muted: oklch(0.202 0.004 264.481);
  --muted-foreground: oklch(0.789 0.015 264.483);
  --popover: oklch(0.139 0.011 261.498);
  --popover-foreground: oklch(0.976 0.002 264.544);
  --card: oklch(0.139 0.011 261.498);
  --card-foreground: oklch(0.976 0.002 264.544);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.39 0.058 263.56);
  --primary-foreground: oklch(0.914 0.015 264.491);
  --secondary: oklch(0.221 0.011 264.319);
  --secondary-foreground: oklch(0.761 0.021 264.441);
  --accent: oklch(0.307 0.026 264.071);
  --accent-foreground: oklch(0.834 0.02 264.458);
  --destructive: oklch(0.681 0.2 40.111);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.39 0.058 263.56);
  --chart-1: oklch(0.39 0.058 263.56);
  --chart-2: oklch(0.221 0.011 264.319);
  --chart-3: oklch(0.307 0.026 264.071);
  --chart-4: oklch(0.252 0.014 264.295);
  --chart-5: oklch(0.388 0.063 263.427);
}