Decimal for shadcn/ui

Decimal is a shadcn/ui theme built around a near-black primary color (#0d0d0c) with near-black accents (#0c0d0d). The light mode uses a neutral background (#fefdfb). Dark mode keeps the near-black primary (#0d0d0c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefdfbsnow
#000000black
Foreground
#040301black
#ffffffwhite
Card
#fcfaf8snow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fefdfbsnow
#000000black
Popover foreground
#040301black
#ffffffwhite
Primary
#0d0d0cblack
#0d0d0cblack
Primary foreground
#aaa6a1darkgray
#aaa6a1darkgray
Secondary
#0c0d0dblack
#0c0d0dblack
Secondary foreground
#a1a5aadarkgray
#a1a5aadarkgray
Muted
#e8edf2lavender
#0d1217black
Muted foreground
#4a4c4fdarkslategray
#b0b2b5darkgray
Accent
#0c0d0dblack
#0c0d0dblack
Accent foreground
#a1a5aadarkgray
#a1a5aadarkgray
Destructive
#a83e00saddlebrown
#fa5c00orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d0d0cblack
#0d0d0cblack

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card20.17:1AAA
Primary button8.03:1AAA
Secondary button7.86:1AAA
Muted text7.30:1AAA
Accent7.86:1AAA
Destructive6.26:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button8.03:1AAA
Secondary button7.86:1AAA
Muted text8.88:1AAA
Accent7.86:1AAA
Destructive6.57:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 71.433);
  --foreground: oklch(0.096 0.014 81.653);
  --muted: oklch(0.944 0.009 251.525);
  --muted-foreground: oklch(0.417 0.005 251.545);
  --popover: oklch(0.993 0.002 71.433);
  --popover-foreground: oklch(0.096 0.014 81.653);
  --card: oklch(0.986 0.004 71.415);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.159 0.002 71.354);
  --primary-foreground: oklch(0.727 0.008 71.35);
  --secondary: oklch(0.157 0.002 251.54);
  --secondary-foreground: oklch(0.721 0.008 251.543);
  --accent: oklch(0.157 0.002 251.54);
  --accent-foreground: oklch(0.721 0.008 251.543);
  --destructive: oklch(0.506 0.152 42.201);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.159 0.002 71.354);
  --chart-1: oklch(0.159 0.002 71.354);
  --chart-2: oklch(0.157 0.002 251.54);
  --chart-3: oklch(0.157 0.002 251.54);
  --chart-4: oklch(0.192 0.003 251.561);
  --chart-5: oklch(0.159 0.003 71.293);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.178 0.013 251.98);
  --muted-foreground: oklch(0.764 0.004 251.496);
  --popover: oklch(0 0 0);
  --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.159 0.002 71.354);
  --primary-foreground: oklch(0.727 0.008 71.35);
  --secondary: oklch(0.157 0.002 251.54);
  --secondary-foreground: oklch(0.721 0.008 251.543);
  --accent: oklch(0.157 0.002 251.54);
  --accent-foreground: oklch(0.721 0.008 251.543);
  --destructive: oklch(0.675 0.208 41.048);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.159 0.002 71.354);
  --chart-1: oklch(0.159 0.002 71.354);
  --chart-2: oklch(0.157 0.002 251.54);
  --chart-3: oklch(0.157 0.002 251.54);
  --chart-4: oklch(0.192 0.003 251.561);
  --chart-5: oklch(0.159 0.003 71.293);
}