Decimal for shadcn/ui

Decimal is a shadcn/ui theme built around a near-white primary color (#faf9fb) with muted light violet accents (#ece7ee). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#faf9fb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#0a030cblack
#fdfcfdwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#060208black
#ffffffwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#060208black
#ffffffwhite
Primary
#faf9fbghostwhite
#faf9fbghostwhite
Primary foreground
#6a4d75dimgray
#6a4d75dimgray
Secondary
#ece7eelavender
#181618black
Secondary foreground
#584261dimgray
#b2abb5darkgray
Muted
#ece8eelavender
#161117black
Muted foreground
#454346darkslategray
#bbb9bcsilver
Accent
#ece7eelavender
#181618black
Accent foreground
#584261dimgray
#b2abb5darkgray
Destructive
#e25503orangered
#fc6f1ddarkorange
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#faf9fbghostwhite
#faf9fbghostwhite

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card20.14:1AAA
Primary button6.82:1AA
Secondary button7.27:1AAA
Muted text8.06:1AAA
Accent7.27:1AAA
Destructive3.79:1AA Large
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button6.82:1AA
Secondary button8.07:1AAA
Muted text9.55:1AAA
Accent8.07:1AAA
Destructive7.39:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.119 0.03 318.364);
  --muted: oklch(0.935 0.009 316.579);
  --muted-foreground: oklch(0.388 0.005 316.569);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.104 0.026 318.773);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.104 0.026 318.773);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.983 0.003 316.599);
  --primary-foreground: oklch(0.466 0.073 316.122);
  --secondary: oklch(0.934 0.012 316.571);
  --secondary-foreground: oklch(0.416 0.058 316.188);
  --accent: oklch(0.934 0.012 316.571);
  --accent-foreground: oklch(0.416 0.058 316.188);
  --destructive: oklch(0.63 0.19 41.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.983 0.003 316.599);
  --chart-1: oklch(0.983 0.003 316.599);
  --chart-2: oklch(0.934 0.012 316.571);
  --chart-3: oklch(0.934 0.012 316.571);
  --chart-4: oklch(0.959 0.007 316.586);
  --chart-5: oklch(0.983 0.004 316.598);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 316.602);
  --muted: oklch(0.187 0.014 316.39);
  --muted-foreground: oklch(0.787 0.004 316.592);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.983 0.003 316.599);
  --primary-foreground: oklch(0.466 0.073 316.122);
  --secondary: oklch(0.202 0.006 316.519);
  --secondary-foreground: oklch(0.75 0.015 316.549);
  --accent: oklch(0.202 0.006 316.519);
  --accent-foreground: oklch(0.75 0.015 316.549);
  --destructive: oklch(0.703 0.191 44.787);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.983 0.003 316.599);
  --chart-1: oklch(0.983 0.003 316.599);
  --chart-2: oklch(0.202 0.006 316.519);
  --chart-3: oklch(0.202 0.006 316.519);
  --chart-4: oklch(0.234 0.008 316.509);
  --chart-5: oklch(0.983 0.004 316.598);
}