Snappy for shadcn/ui

Snappy is a shadcn/ui theme built around a blue primary color (#6d9ad9) with muted light blue accents (#e8eaee). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#6d9ad9) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#ffffffwhite
#020203black
Foreground
#040b15black
#ffffffwhite
Card
#ffffffwhite
#020203black
Card foreground
#040b15black
#ffffffwhite
Popover
#ffffffwhite
#020203black
Popover foreground
#040b15black
#ffffffwhite
Primary
#6d9ad9cornflowerblue
#6d9ad9cornflowerblue
Primary foreground
#040910black
#040910black
Secondary
#e8eaeelavender
#15191eblack
Secondary foreground
#45505edarkslategray
#a4b0c1darkgray
Muted
#dfe2e7gainsboro
#181b20black
Muted foreground
#4b5158darkslategray
#a7acb4darkgray
Accent
#e8eaeelavender
#15191eblack
Accent foreground
#45505edarkslategray
#a4b0c1darkgray
Destructive
#a5360dsaddlebrown
#ed5821chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6d9ad9cornflowerblue
#6d9ad9cornflowerblue

Contrast

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

Light mode
Text on background19.73:1AAA
Text on card19.73:1AAA
Primary button6.93:1AA
Secondary button6.80:1AA
Muted text6.18:1AA
Accent6.80:1AA
Destructive6.70:1AA
Dark mode
Text on background20.70:1AAA
Text on card20.70:1AAA
Primary button6.93:1AA
Secondary button8.05:1AAA
Muted text7.54:1AAA
Accent8.05:1AAA
Destructive3.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.149 0.025 253.323);
  --muted: oklch(0.912 0.008 256.685);
  --muted-foreground: oklch(0.431 0.014 256.758);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.149 0.025 253.323);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.149 0.025 253.323);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.68 0.106 256.909);
  --primary-foreground: oklch(0.138 0.019 251.217);
  --secondary: oklch(0.936 0.006 256.676);
  --secondary-foreground: oklch(0.426 0.027 256.808);
  --accent: oklch(0.936 0.006 256.676);
  --accent-foreground: oklch(0.426 0.027 256.808);
  --destructive: oklch(0.491 0.154 37.605);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.68 0.106 256.909);
  --chart-1: oklch(0.68 0.106 256.909);
  --chart-2: oklch(0.936 0.006 256.676);
  --chart-3: oklch(0.936 0.006 256.676);
  --chart-4: oklch(0.96 0.003 256.667);
  --chart-5: oklch(0.679 0.112 256.925);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.006 251.859);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.011 256.788);
  --muted-foreground: oklch(0.743 0.013 256.714);
  --popover: oklch(0.089 0.006 251.859);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.089 0.006 251.859);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.68 0.106 256.909);
  --primary-foreground: oklch(0.138 0.019 251.217);
  --secondary: oklch(0.21 0.013 256.804);
  --secondary-foreground: oklch(0.753 0.028 256.765);
  --accent: oklch(0.21 0.013 256.804);
  --accent-foreground: oklch(0.753 0.028 256.765);
  --destructive: oklch(0.651 0.195 38.281);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.68 0.106 256.909);
  --chart-1: oklch(0.68 0.106 256.909);
  --chart-2: oklch(0.21 0.013 256.804);
  --chart-3: oklch(0.21 0.013 256.804);
  --chart-4: oklch(0.242 0.016 256.811);
  --chart-5: oklch(0.679 0.112 256.925);
}