Triangular for shadcn/ui

Triangular is a shadcn/ui theme built around a purple primary color (#682f6a) with green accents (#316a2f). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#682f6a) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#ffffffwhite
#070307black
Foreground
#000000black
#ffffffwhite
Card
#ffffffwhite
#070307black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#070307black
Popover foreground
#000000black
#ffffffwhite
Primary
#682f6arebeccapurple
#682f6arebeccapurple
Primary foreground
#efdceflavender
#efdceflavender
Secondary
#316a2fdarkolivegreen
#316a2fdarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d6e6d6gainsboro
#1a2919black
Muted foreground
#4a5f49darkolivegreen
#a1b6a0darkgray
Accent
#316a2fdarkolivegreen
#316a2fdarkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c9390dfirebrick
#f15627tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#682f6arebeccapurple
#682f6arebeccapurple

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.33:1AAA
Secondary button6.47:1AA
Muted text5.33:1AA
Accent6.47:1AA
Destructive5.14:1AA
Dark mode
Text on background20.45:1AAA
Text on card20.45:1AAA
Primary button7.33:1AAA
Secondary button6.47:1AA
Muted text7.05:1AAA
Accent6.47:1AA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.908 0.027 144.426);
  --muted-foreground: oklch(0.462 0.043 143.991);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.407 0.116 326.177);
  --primary-foreground: oklch(0.914 0.034 324.85);
  --secondary: oklch(0.471 0.11 142.995);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.471 0.11 142.995);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.557 0.188 35.267);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.407 0.116 326.177);
  --chart-1: oklch(0.407 0.116 326.177);
  --chart-2: oklch(0.471 0.11 142.995);
  --chart-3: oklch(0.471 0.11 142.995);
  --chart-4: oklch(0.504 0.118 142.979);
  --chart-5: oklch(0.408 0.124 326.253);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.112 0.014 325.549);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.262 0.036 143.689);
  --muted-foreground: oklch(0.753 0.039 144.281);
  --popover: oklch(0.112 0.014 325.549);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.112 0.014 325.549);
  --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.407 0.116 326.177);
  --primary-foreground: oklch(0.914 0.034 324.85);
  --secondary: oklch(0.471 0.11 142.995);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.471 0.11 142.995);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.657 0.199 36.573);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.407 0.116 326.177);
  --chart-1: oklch(0.407 0.116 326.177);
  --chart-2: oklch(0.471 0.11 142.995);
  --chart-3: oklch(0.471 0.11 142.995);
  --chart-4: oklch(0.504 0.118 142.979);
  --chart-5: oklch(0.408 0.124 326.253);
}