Triangular is a shadcn/ui theme built around a violet primary color (#8153a2) with green accents (#74a253). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the violet primary (#8153a2) on a violet-tinted background (#08030c).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfdsnow | #08030cblack |
| Foreground | #08040bblack | #f8f5fawhitesmoke |
| Card | #fdfbfdsnow | #08030cblack |
| Card foreground | #08040bblack | #f8f5fawhitesmoke |
| Popover | #fdfbfdsnow | #08030cblack |
| Popover foreground | #08040bblack | #f8f5fawhitesmoke |
| Primary | #8153a2rebeccapurple | #8153a2rebeccapurple |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #74a253olivedrab | #74a253olivedrab |
| Secondary foreground | #000000black | #000000black |
| Muted | #d8ded4gainsboro | #252b21darkslategray |
| Muted foreground | #474b44darkslategray | #b7bbb4silver |
| Accent | #74a253olivedrab | #74a253olivedrab |
| Accent foreground | #000000black | #000000black |
| Destructive | #9d1b02darkred | #fd5635tomato |
| Destructive foreground | #ffd9d2bisque | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8153a2rebeccapurple | #8153a2rebeccapurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 5.68:1 | AA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 6.48:1 | AA |
| Accent | 7.00:1 | AAA |
| Destructive | 6.23:1 | AA |
| Text on background | 18.87:1 | AAA |
| Text on card | 18.87:1 | AAA |
| Primary button | 5.68:1 | AA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 7.42:1 | AAA |
| Accent | 7.00:1 | AAA |
| Destructive | 6.56:1 | AA |
Paste this into your globals.css to use Triangular in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 311.701);
--foreground: oklch(0.12 0.023 313.143);
--muted: oklch(0.893 0.015 131.86);
--muted-foreground: oklch(0.406 0.013 131.986);
--popover: oklch(0.991 0.003 311.701);
--popover-foreground: oklch(0.12 0.023 313.143);
--card: oklch(0.991 0.003 311.701);
--card-foreground: oklch(0.12 0.023 313.143);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.527 0.128 309.591);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.659 0.119 133.551);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.659 0.119 133.551);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.449 0.167 32.398);
--destructive-foreground: oklch(0.915 0.043 31.209);
--ring: oklch(0.527 0.128 309.591);
--chart-1: oklch(0.527 0.128 309.591);
--chart-2: oklch(0.659 0.119 133.551);
--chart-3: oklch(0.659 0.119 133.551);
--chart-4: oklch(0.686 0.12 133.486);
--chart-5: oklch(0.523 0.139 309.336);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.117 0.028 313.352);
--foreground: oklch(0.974 0.007 311.669);
--muted: oklch(0.281 0.02 132.317);
--muted-foreground: oklch(0.787 0.011 131.838);
--popover: oklch(0.117 0.028 313.352);
--popover-foreground: oklch(0.974 0.007 311.669);
--card: oklch(0.117 0.028 313.352);
--card-foreground: oklch(0.974 0.007 311.669);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.527 0.128 309.591);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.659 0.119 133.551);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.659 0.119 133.551);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.677 0.208 33.204);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.527 0.128 309.591);
--chart-1: oklch(0.527 0.128 309.591);
--chart-2: oklch(0.659 0.119 133.551);
--chart-3: oklch(0.659 0.119 133.551);
--chart-4: oklch(0.686 0.12 133.486);
--chart-5: oklch(0.523 0.139 309.336);
}