Box for shadcn/ui

Box is a shadcn/ui theme built around a muted light indigo primary color (#dcddea) with muted light violet accents (#e2dcea). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted light indigo primary (#dcddea) on a neutral background (#020308).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#020308black
Foreground
#020308black
#fcfcfdwhite
Card
#f8f8fcghostwhite
#020308black
Card foreground
#020308black
#fcfcfdwhite
Popover
#f8f8fcghostwhite
#020308black
Popover foreground
#020308black
#fcfcfdwhite
Primary
#dcddeagainsboro
#dcddeagainsboro
Primary foreground
#383b5cdarkslategray
#383b5cdarkslategray
Secondary
#dce4eagainsboro
#dce4eagainsboro
Secondary foreground
#384c5cdarkslategray
#384c5cdarkslategray
Muted
#d7dce0gainsboro
#1f2428darkslategray
Muted foreground
#454b4fdarkslategray
#b0b6basilver
Accent
#e2dceagainsboro
#e2dceagainsboro
Accent foreground
#48385cdarkslategray
#48385cdarkslategray
Destructive
#a51a0dfirebrick
#ef4434tomato
Destructive foreground
#fde9e7linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dcddeagainsboro
#dcddeagainsboro

Contrast

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

Light mode
Text on background19.48:1AAA
Text on card19.48:1AAA
Primary button8.00:1AAA
Secondary button6.92:1AA
Muted text6.40:1AA
Accent7.85:1AAA
Destructive6.52:1AA
Dark mode
Text on background20.12:1AAA
Text on card20.12:1AAA
Primary button8.00:1AAA
Secondary button6.92:1AA
Muted text7.61:1AAA
Accent7.85:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 283.028);
  --foreground: oklch(0.099 0.018 278.097);
  --muted: oklch(0.891 0.008 240.406);
  --muted-foreground: oklch(0.408 0.011 240.651);
  --popover: oklch(0.981 0.005 283.028);
  --popover-foreground: oklch(0.099 0.018 278.097);
  --card: oklch(0.981 0.005 283.028);
  --card-foreground: oklch(0.099 0.018 278.097);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.901 0.017 282.779);
  --primary-foreground: oklch(0.364 0.057 280.024);
  --secondary: oklch(0.914 0.011 240.456);
  --secondary-foreground: oklch(0.407 0.036 241.672);
  --accent: oklch(0.904 0.019 305.457);
  --accent-foreground: oklch(0.374 0.062 303.453);
  --destructive: oklch(0.465 0.175 30.068);
  --destructive-foreground: oklch(0.95 0.022 23.818);
  --ring: oklch(0.901 0.017 282.779);
  --chart-1: oklch(0.901 0.017 282.779);
  --chart-2: oklch(0.914 0.011 240.456);
  --chart-3: oklch(0.904 0.019 305.457);
  --chart-4: oklch(0.938 0.008 240.405);
  --chart-5: oklch(0.899 0.019 282.736);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.02 277.336);
  --foreground: oklch(0.991 0.002 283.079);
  --muted: oklch(0.258 0.011 240.876);
  --muted-foreground: oklch(0.772 0.009 240.447);
  --popover: oklch(0.097 0.02 277.336);
  --popover-foreground: oklch(0.991 0.002 283.079);
  --card: oklch(0.097 0.02 277.336);
  --card-foreground: oklch(0.991 0.002 283.079);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.901 0.017 282.779);
  --primary-foreground: oklch(0.364 0.057 280.024);
  --secondary: oklch(0.914 0.011 240.456);
  --secondary-foreground: oklch(0.407 0.036 241.672);
  --accent: oklch(0.904 0.019 305.457);
  --accent-foreground: oklch(0.374 0.062 303.453);
  --destructive: oklch(0.634 0.21 29.396);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.901 0.017 282.779);
  --chart-1: oklch(0.901 0.017 282.779);
  --chart-2: oklch(0.914 0.011 240.456);
  --chart-3: oklch(0.904 0.019 305.457);
  --chart-4: oklch(0.938 0.008 240.405);
  --chart-5: oklch(0.899 0.019 282.736);
}