Nimble for shadcn/ui

Nimble is a shadcn/ui theme built around a violet primary color (#4c3181) with purple accents (#743181). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#4c3181) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#ffffffwhite
#040307black
Foreground
#040208black
#fcfbfdsnow
Card
#ffffffwhite
#040307black
Card foreground
#040208black
#fcfbfdsnow
Popover
#ffffffwhite
#040307black
Popover foreground
#040208black
#fcfbfdsnow
Primary
#4c3181darkslateblue
#4c3181darkslateblue
Primary foreground
#f0edf8whitesmoke
#f0edf8whitesmoke
Secondary
#313e81darkslateblue
#313e81darkslateblue
Secondary foreground
#edeef8lavender
#edeef8lavender
Muted
#e6e7eflavender
#101119black
Muted foreground
#5e616edimgray
#9194a1lightslategray
Accent
#743181rebeccapurple
#743181rebeccapurple
Accent foreground
#f6edf8whitesmoke
#f6edf8whitesmoke
Destructive
#8d0f01darkred
#fd2912orangered
Destructive foreground
#fec8c2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4c3181darkslateblue
#4c3181darkslateblue

Contrast

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

Light mode
Text on background20.64:1AAA
Text on card20.64:1AAA
Primary button8.79:1AAA
Secondary button8.46:1AAA
Muted text5.01:1AA
Accent7.34:1AAA
Destructive6.44:1AA
Dark mode
Text on background19.94:1AAA
Text on card19.94:1AAA
Primary button8.79:1AAA
Secondary button8.46:1AAA
Muted text6.22:1AA
Accent7.34:1AAA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.101 0.02 301.995);
  --muted: oklch(0.93 0.011 277.1);
  --muted-foreground: oklch(0.494 0.022 276.606);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.101 0.02 301.995);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.101 0.02 301.995);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.39 0.13 295.062);
  --primary-foreground: oklch(0.951 0.016 301.226);
  --secondary: oklch(0.392 0.113 271.729);
  --secondary-foreground: oklch(0.952 0.013 277.069);
  --accent: oklch(0.44 0.143 320.66);
  --accent-foreground: oklch(0.955 0.018 320.561);
  --destructive: oklch(0.412 0.16 30.81);
  --destructive-foreground: oklch(0.88 0.062 25.726);
  --ring: oklch(0.39 0.13 295.062);
  --chart-1: oklch(0.39 0.13 295.062);
  --chart-2: oklch(0.392 0.113 271.729);
  --chart-3: oklch(0.44 0.143 320.66);
  --chart-4: oklch(0.415 0.121 271.648);
  --chart-5: oklch(0.386 0.137 294.452);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.017 301.91);
  --foreground: oklch(0.991 0.003 301.449);
  --muted: oklch(0.181 0.016 275.844);
  --muted-foreground: oklch(0.667 0.02 276.823);
  --popover: oklch(0.103 0.017 301.91);
  --popover-foreground: oklch(0.991 0.003 301.449);
  --card: oklch(0.103 0.017 301.91);
  --card-foreground: oklch(0.991 0.003 301.449);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.39 0.13 295.062);
  --primary-foreground: oklch(0.951 0.016 301.226);
  --secondary: oklch(0.392 0.113 271.729);
  --secondary-foreground: oklch(0.952 0.013 277.069);
  --accent: oklch(0.44 0.143 320.66);
  --accent-foreground: oklch(0.955 0.018 320.561);
  --destructive: oklch(0.637 0.243 30.469);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.39 0.13 295.062);
  --chart-1: oklch(0.39 0.13 295.062);
  --chart-2: oklch(0.392 0.113 271.729);
  --chart-3: oklch(0.44 0.143 320.66);
  --chart-4: oklch(0.415 0.121 271.648);
  --chart-5: oklch(0.386 0.137 294.452);
}