Decimal for shadcn/ui

Decimal is a shadcn/ui theme built around a vivid blue primary color (#1829c3) with vivid green accents (#29c318). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid blue primary (#1829c3) on a neutral background (#020204).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#020204black
Foreground
#040610black
#fbfcfdwhite
Card
#f8f8fcghostwhite
#020204black
Card foreground
#040610black
#fbfcfdwhite
Popover
#f8f8fcghostwhite
#020204black
Popover foreground
#040610black
#fbfcfdwhite
Primary
#1829c3mediumblue
#1829c3mediumblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c31829firebrick
#c31829firebrick
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e5e0e1gainsboro
#1f1a1ablack
Muted foreground
#4d4748darkslategray
#b8b2b3darkgray
Accent
#29c318limegreen
#29c318limegreen
Accent foreground
#030e02black
#030e02black
Destructive
#730f02maroon
#eb2005red
Destructive foreground
#fdb4aalightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1829c3mediumblue
#1829c3mediumblue

Contrast

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

Light mode
Text on background19.12:1AAA
Text on card19.12:1AAA
Primary button9.77:1AAA
Secondary button6.01:1AA
Muted text6.98:1AA
Accent8.36:1AAA
Destructive6.82:1AA
Dark mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button9.77:1AAA
Secondary button6.01:1AA
Muted text8.27:1AAA
Accent8.36:1AAA
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 281.211);
  --foreground: oklch(0.125 0.025 275.519);
  --muted: oklch(0.912 0.006 10.216);
  --muted-foreground: oklch(0.404 0.008 10.53);
  --popover: oklch(0.981 0.005 281.211);
  --popover-foreground: oklch(0.125 0.025 275.519);
  --card: oklch(0.981 0.005 281.211);
  --card-foreground: oklch(0.125 0.025 275.519);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.407 0.231 266.928);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.2 24.07);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.713 0.231 141.883);
  --accent-foreground: oklch(0.145 0.037 140.29);
  --destructive: oklch(0.358 0.135 31.443);
  --destructive-foreground: oklch(0.836 0.088 27.486);
  --ring: oklch(0.407 0.231 266.928);
  --chart-1: oklch(0.407 0.231 266.928);
  --chart-2: oklch(0.524 0.2 24.07);
  --chart-3: oklch(0.713 0.231 141.883);
  --chart-4: oklch(0.551 0.211 24.176);
  --chart-5: oklch(0.407 0.237 266.425);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.01 277.553);
  --foreground: oklch(0.99 0.002 281.248);
  --muted: oklch(0.222 0.008 10.902);
  --muted-foreground: oklch(0.769 0.007 10.278);
  --popover: oklch(0.083 0.01 277.553);
  --popover-foreground: oklch(0.99 0.002 281.248);
  --card: oklch(0.083 0.01 277.553);
  --card-foreground: oklch(0.99 0.002 281.248);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.407 0.231 266.928);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.2 24.07);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.713 0.231 141.883);
  --accent-foreground: oklch(0.145 0.037 140.29);
  --destructive: oklch(0.599 0.233 30.644);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.407 0.231 266.928);
  --chart-1: oklch(0.407 0.231 266.928);
  --chart-2: oklch(0.524 0.2 24.07);
  --chart-3: oklch(0.713 0.231 141.883);
  --chart-4: oklch(0.551 0.211 24.176);
  --chart-5: oklch(0.407 0.237 266.425);
}