Arithmetic for shadcn/ui

Arithmetic is a shadcn/ui theme built around a light red primary color (#dcadb7) with light blue accents (#adb7dc). The light mode uses a neutral background (#fcf7f8). Dark mode keeps the light red primary (#dcadb7) on a red-tinted background (#0b0406).

Color palette

TokenLightDark
Background
#fcf7f8snow
#0b0406black
Foreground
#090103black
#fbf9f9snow
Card
#fbf4f5lavenderblush
#0f0608black
Card foreground
#040101black
#fdfcfcsnow
Popover
#fcf7f8snow
#0b0406black
Popover foreground
#090103black
#fbf9f9snow
Primary
#dcadb7silver
#dcadb7silver
Primary foreground
#3d1a22darkslategray
#3d1a22darkslategray
Secondary
#b7dcadsilver
#b7dcadsilver
Secondary foreground
#223d1adarkslategray
#223d1adarkslategray
Muted
#e6ebe5gainsboro
#151a14black
Muted foreground
#3b4837darkslategray
#bbc8b7silver
Accent
#adb7dclightsteelblue
#adb7dclightsteelblue
Accent foreground
#1a223dmidnightblue
#1a223dmidnightblue
Destructive
#c94803chocolate
#fc752ctomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dcadb7silver
#dcadb7silver

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.12:1AAA
Primary button7.80:1AAA
Secondary button7.90:1AAA
Muted text8.01:1AAA
Accent7.89:1AAA
Destructive4.75:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.57:1AAA
Primary button7.80:1AAA
Secondary button7.90:1AAA
Muted text10.14:1AAA
Accent7.89:1AAA
Destructive7.69:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 2.225);
  --foreground: oklch(0.1 0.026 2.275);
  --muted: oklch(0.935 0.009 138.894);
  --muted-foreground: oklch(0.385 0.032 138.936);
  --popover: oklch(0.981 0.006 2.225);
  --popover-foreground: oklch(0.1 0.026 2.275);
  --card: oklch(0.972 0.008 2.306);
  --card-foreground: oklch(0.08 0.021 2.275);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.793 0.056 3.966);
  --primary-foreground: oklch(0.271 0.055 7.744);
  --secondary: oklch(0.855 0.075 138.94);
  --secondary-foreground: oklch(0.327 0.067 139.19);
  --accent: oklch(0.784 0.054 272.976);
  --accent-foreground: oklch(0.258 0.052 270.693);
  --destructive: oklch(0.573 0.176 40.872);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.793 0.056 3.966);
  --chart-1: oklch(0.793 0.056 3.966);
  --chart-2: oklch(0.855 0.075 138.94);
  --chart-3: oklch(0.784 0.054 272.976);
  --chart-4: oklch(0.874 0.065 138.929);
  --chart-5: oklch(0.791 0.061 4.116);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.017 2.25);
  --foreground: oklch(0.983 0.002 2.133);
  --muted: oklch(0.21 0.013 138.919);
  --muted-foreground: oklch(0.817 0.027 138.904);
  --popover: oklch(0.123 0.017 2.25);
  --popover-foreground: oklch(0.983 0.002 2.133);
  --card: oklch(0.136 0.019 3.287);
  --card-foreground: oklch(0.992 0.001 2.1);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.793 0.056 3.966);
  --primary-foreground: oklch(0.271 0.055 7.744);
  --secondary: oklch(0.855 0.075 138.94);
  --secondary-foreground: oklch(0.327 0.067 139.19);
  --accent: oklch(0.784 0.054 272.976);
  --accent-foreground: oklch(0.258 0.052 270.693);
  --destructive: oklch(0.712 0.184 44.948);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.793 0.056 3.966);
  --chart-1: oklch(0.793 0.056 3.966);
  --chart-2: oklch(0.855 0.075 138.94);
  --chart-3: oklch(0.784 0.054 272.976);
  --chart-4: oklch(0.874 0.065 138.929);
  --chart-5: oklch(0.791 0.061 4.116);
}