Calculating for shadcn/ui

Calculating is a shadcn/ui theme built around a light purple primary color (#efc8e2) with muted light purple accents (#d7c6d2). The light mode uses a neutral background (#fdf6fb). Dark mode keeps the light purple primary (#efc8e2) on a purple-tinted background (#0e060c).

Color palette

TokenLightDark
Background
#fdf6fbsnow
#0e060cblack
Foreground
#040103black
#fdfcfdwhite
Card
#fdf2f9lavenderblush
#12080fblack
Card foreground
#000000black
#ffffffwhite
Popover
#fdf2f9lavenderblush
#12080fblack
Popover foreground
#000000black
#ffffffwhite
Primary
#efc8e2thistle
#efc8e2thistle
Primary foreground
#671e50purple
#671e50purple
Secondary
#ebe6e9lavender
#271b23black
Secondary foreground
#584652darkslategray
#c7aebfsilver
Muted
#f1e4edlinen
#1b0e17black
Muted foreground
#5f595ddimgray
#a6a0a4darkgray
Accent
#d7c6d2thistle
#3f2737darkslategray
Accent foreground
#3f2c39darkslategray
#d8c0d0thistle
Destructive
#b63e02firebrick
#fd671cchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#efc8e2thistle
#efc8e2thistle

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.23:1AAA
Primary button7.45:1AAA
Secondary button7.02:1AAA
Muted text5.54:1AA
Accent7.92:1AAA
Destructive5.72:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.71:1AAA
Primary button7.45:1AAA
Secondary button8.06:1AAA
Muted text7.30:1AAA
Accent7.94:1AAA
Destructive7.11:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.01 336.756);
  --foreground: oklch(0.084 0.022 337.124);
  --muted: oklch(0.932 0.019 336.952);
  --muted-foreground: oklch(0.471 0.009 336.937);
  --popover: oklch(0.972 0.015 336.857);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.015 336.857);
  --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.873 0.056 337.771);
  --primary-foreground: oklch(0.368 0.12 342.739);
  --secondary: oklch(0.928 0.007 336.709);
  --secondary-foreground: oklch(0.418 0.03 337.903);
  --accent: oklch(0.844 0.024 337.1);
  --accent-foreground: oklch(0.321 0.034 338.485);
  --destructive: oklch(0.529 0.165 39.899);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.873 0.056 337.771);
  --chart-1: oklch(0.873 0.056 337.771);
  --chart-2: oklch(0.928 0.007 336.709);
  --chart-3: oklch(0.844 0.024 337.1);
  --chart-4: oklch(0.952 0.005 336.656);
  --chart-5: oklch(0.872 0.06 337.837);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.02 338.215);
  --foreground: oklch(0.992 0.002 336.603);
  --muted: oklch(0.185 0.028 339.327);
  --muted-foreground: oklch(0.713 0.008 336.785);
  --popover: oklch(0.151 0.023 339.055);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.151 0.023 339.055);
  --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.873 0.056 337.771);
  --primary-foreground: oklch(0.368 0.12 342.739);
  --secondary: oklch(0.241 0.024 338.37);
  --secondary-foreground: oklch(0.777 0.037 337.454);
  --accent: oklch(0.309 0.045 339.227);
  --accent-foreground: oklch(0.833 0.036 337.371);
  --destructive: oklch(0.694 0.199 42.07);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.873 0.056 337.771);
  --chart-1: oklch(0.873 0.056 337.771);
  --chart-2: oklch(0.241 0.024 338.37);
  --chart-3: oklch(0.309 0.045 339.227);
  --chart-4: oklch(0.271 0.028 338.474);
  --chart-5: oklch(0.872 0.06 337.837);
}