Trigonometry for shadcn/ui

Trigonometry is a shadcn/ui theme built around a vivid purple primary color (#dd05f5) with muted light purple accents (#d8c2db). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#dd05f5) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#ffffffwhite
#030203black
Foreground
#130514black
#ffffffwhite
Card
#fcfcfcsnow
#060307black
Card foreground
#0f0410black
#ffffffwhite
Popover
#ffffffwhite
#030203black
Popover foreground
#130514black
#ffffffwhite
Primary
#dd05f5magenta
#dd05f5magenta
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e3d8e4gainsboro
#212121black
Secondary foreground
#4f3852darkslategray
#bababasilver
Muted
#dcd5ddgainsboro
#2a2222darkslategray
Muted foreground
#474347darkslategray
#bcb8b8silver
Accent
#d8c2dbthistle
#3e3838darkslategray
Accent foreground
#402843darkslategray
#d6d1d1lightgrey
Destructive
#d6180afirebrick
#db180ared
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dd05f5magenta
#dd05f5magenta

Contrast

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

Light mode
Text on background19.82:1AAA
Text on card19.66:1AAA
Primary button3.88:1AA Large
Secondary button7.50:1AAA
Muted text6.74:1AA
Accent7.92:1AAA
Destructive5.24:1AA
Dark mode
Text on background20.72:1AAA
Text on card20.46:1AAA
Primary button3.88:1AA Large
Secondary button8.28:1AAA
Muted text7.88:1AAA
Accent7.64:1AAA
Destructive5.05:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.149 0.039 323.69);
  --muted: oklch(0.88 0.013 322.685);
  --muted-foreground: oklch(0.387 0.008 322.714);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.149 0.039 323.69);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.136 0.034 323.871);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.646 0.304 322.769);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.894 0.021 322.72);
  --secondary-foreground: oklch(0.377 0.053 323.151);
  --accent: oklch(0.841 0.041 322.818);
  --accent-foreground: oklch(0.318 0.056 323.262);
  --destructive: oklch(0.558 0.219 29.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.646 0.304 322.769);
  --chart-1: oklch(0.646 0.304 322.769);
  --chart-2: oklch(0.894 0.021 322.72);
  --chart-3: oklch(0.841 0.041 322.818);
  --chart-4: oklch(0.918 0.016 322.696);
  --chart-5: oklch(0.652 0.308 322.691);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.011 323.647);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.262 0.012 17.92);
  --muted-foreground: oklch(0.786 0.005 17.256);
  --popover: oklch(0.088 0.011 323.647);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.111 0.014 323.647);
  --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.646 0.304 322.769);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.248 0 173.29);
  --secondary-foreground: oklch(0.789 0 171.254);
  --accent: oklch(0.346 0.008 17.559);
  --accent-foreground: oklch(0.866 0.005 17.249);
  --destructive: oklch(0.567 0.223 29.757);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.646 0.304 322.769);
  --chart-1: oklch(0.646 0.304 322.769);
  --chart-2: oklch(0.248 0 173.29);
  --chart-3: oklch(0.346 0.008 17.559);
  --chart-4: oklch(0.28 0 180);
  --chart-5: oklch(0.652 0.308 322.691);
}