Surround for shadcn/ui

Surround is a shadcn/ui theme built around a vivid indigo primary color (#3511e8) with muted light indigo accents (#cac8d5). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#3511e8) on an indigo-tinted background (#06050a).

Color palette

TokenLightDark
Background
#ffffffwhite
#06050ablack
Foreground
#070515black
#fcfcfdwhite
Card
#fcfcfcsnow
#08060eblack
Card foreground
#060411black
#ffffffwhite
Popover
#fcfcfcsnow
#08060eblack
Popover foreground
#060411black
#ffffffwhite
Primary
#3511e8blue
#3511e8blue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4e4e7gainsboro
#2b2938darkslategray
Secondary foreground
#494851darkslategray
#c4c1d2silver
Muted
#e3e2e9gainsboro
#17161dblack
Muted foreground
#56555edimgray
#a3a1aadarkgray
Accent
#cac8d5lightgrey
#393456darkslategray
Accent foreground
#312e3ddarkslategray
#d8d6e6gainsboro
Destructive
#c54a11chocolate
#eb5c19chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3511e8blue
#3511e8blue

Contrast

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

Light mode
Text on background20.16:1AAA
Text on card19.88:1AAA
Primary button8.72:1AAA
Secondary button7.11:1AAA
Muted text5.73:1AA
Accent8.00:1AAA
Destructive4.80:1AA
Dark mode
Text on background19.82:1AAA
Text on card20.11:1AAA
Primary button8.72:1AAA
Secondary button8.07:1AAA
Muted text7.02:1AAA
Accent8.17:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.13 0.038 289.839);
  --muted: oklch(0.917 0.008 293.897);
  --muted-foreground: oklch(0.453 0.014 293.466);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.119 0.033 291.019);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.119 0.033 291.019);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.446 0.277 272.5);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.92 0.004 293.982);
  --secondary-foreground: oklch(0.406 0.015 293.356);
  --accent: oklch(0.838 0.019 293.644);
  --accent-foreground: oklch(0.31 0.027 292.406);
  --destructive: oklch(0.57 0.169 40.639);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.446 0.277 272.5);
  --chart-1: oklch(0.446 0.277 272.5);
  --chart-2: oklch(0.92 0.004 293.982);
  --chart-3: oklch(0.838 0.019 293.644);
  --chart-4: oklch(0.944 0.003 294.009);
  --chart-5: oklch(0.447 0.282 271.644);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.015 293.2);
  --foreground: oklch(0.991 0.001 294.04);
  --muted: oklch(0.206 0.012 292.95);
  --muted-foreground: oklch(0.714 0.013 293.728);
  --popover: oklch(0.132 0.018 292.636);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.132 0.018 292.636);
  --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.446 0.277 272.5);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.289 0.028 292.182);
  --secondary-foreground: oklch(0.818 0.024 293.515);
  --accent: oklch(0.346 0.059 290.591);
  --accent-foreground: oklch(0.882 0.023 293.582);
  --destructive: oklch(0.653 0.191 40.89);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.446 0.277 272.5);
  --chart-1: oklch(0.446 0.277 272.5);
  --chart-2: oklch(0.289 0.028 292.182);
  --chart-3: oklch(0.346 0.059 290.591);
  --chart-4: oklch(0.317 0.032 292.114);
  --chart-5: oklch(0.447 0.282 271.644);
}