Numeric for shadcn/ui

Numeric is a shadcn/ui theme built around a muted deep yellow primary color (#24241e) with muted deep green accents (#22241e). The light mode uses a neutral background (#fefefb). Dark mode keeps the muted deep yellow primary (#24241e) on a neutral background (#040401).

Color palette

TokenLightDark
Background
#fefefbwhite
#040401black
Foreground
#0d0c02black
#ffffffwhite
Card
#fefefbwhite
#040401black
Card foreground
#0d0c02black
#ffffffwhite
Popover
#fefefbwhite
#040401black
Popover foreground
#0d0c02black
#ffffffwhite
Primary
#24241eblack
#24241eblack
Primary foreground
#c0c0b4silver
#c0c0b4silver
Secondary
#24211eblack
#24211eblack
Secondary foreground
#c0b9b4silver
#c0b9b4silver
Muted
#ecdfd5gainsboro
#2a1d13black
Muted foreground
#6c6560dimgray
#9f9893darkgray
Accent
#22241eblack
#22241eblack
Accent foreground
#bbc0b4silver
#bbc0b4silver
Destructive
#ce0703red
#e20703red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#24241eblack
#24241eblack

Contrast

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

Light mode
Text on background19.40:1AAA
Text on card19.40:1AAA
Primary button8.51:1AAA
Secondary button8.27:1AAA
Muted text4.37:1AA Large
Accent8.44:1AAA
Destructive5.74:1AA
Dark mode
Text on background20.54:1AAA
Text on card20.54:1AAA
Primary button8.51:1AAA
Secondary button8.27:1AAA
Muted text5.74:1AA
Accent8.44:1AAA
Destructive4.92:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 103.177);
  --foreground: oklch(0.152 0.024 106.066);
  --muted: oklch(0.911 0.02 59.983);
  --muted-foreground: oklch(0.512 0.012 59.959);
  --popover: oklch(0.996 0.004 103.177);
  --popover-foreground: oklch(0.152 0.024 106.066);
  --card: oklch(0.996 0.004 103.177);
  --card-foreground: oklch(0.152 0.024 106.066);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.258 0.01 103.742);
  --primary-foreground: oklch(0.804 0.016 103.435);
  --secondary: oklch(0.25 0.007 59.893);
  --secondary-foreground: oklch(0.791 0.011 60.093);
  --accent: oklch(0.256 0.012 126.352);
  --accent-foreground: oklch(0.801 0.018 126.043);
  --destructive: oklch(0.536 0.218 29.275);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.258 0.01 103.742);
  --chart-1: oklch(0.258 0.01 103.742);
  --chart-2: oklch(0.25 0.007 59.893);
  --chart-3: oklch(0.256 0.012 126.352);
  --chart-4: oklch(0.281 0.008 59.87);
  --chart-5: oklch(0.261 0.013 103.923);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.014 106.012);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.244 0.027 58.432);
  --muted-foreground: oklch(0.685 0.011 60.058);
  --popover: oklch(0.103 0.014 106.012);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.103 0.014 106.012);
  --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.258 0.01 103.742);
  --primary-foreground: oklch(0.804 0.016 103.435);
  --secondary: oklch(0.25 0.007 59.893);
  --secondary-foreground: oklch(0.791 0.011 60.093);
  --accent: oklch(0.256 0.012 126.352);
  --accent-foreground: oklch(0.801 0.018 126.043);
  --destructive: oklch(0.575 0.234 29.27);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.258 0.01 103.742);
  --chart-1: oklch(0.258 0.01 103.742);
  --chart-2: oklch(0.25 0.007 59.893);
  --chart-3: oklch(0.256 0.012 126.352);
  --chart-4: oklch(0.281 0.008 59.87);
  --chart-5: oklch(0.261 0.013 103.923);
}