Loyal is a shadcn/ui theme built around a vivid deep violet primary color (#0b0212) with muted violet accents (#c1add1). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the vivid deep violet primary (#0b0212) on a violet-tinted background (#08050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #08050ablack |
| Foreground | #030104black | #fdfcfdwhite |
| Card | #faf8fcghostwhite | #0b070eblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdfcfdwhite | #08050ablack |
| Popover foreground | #030104black | #fdfcfdwhite |
| Primary | #0b0212black | #0b0212black |
| Primary foreground | #d9b6f7thistle | #d9b6f7thistle |
| Secondary | #d5cbdclightgrey | #1a191ablack |
| Secondary foreground | #3c2f46darkslategray | #b3b0b5darkgray |
| Muted | #eee7f3lavender | #120c18black |
| Muted foreground | #404040darkslategray | #bfbfbfsilver |
| Accent | #c1add1silver | #312c35darkslategray |
| Accent foreground | #271c31darkslategray | #cac5celightgrey |
| Destructive | #a83110firebrick | #eb4f24chocolate |
| Destructive foreground | #fdf0ecseashell | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0b0212black | #0b0212black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.24:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 11.61:1 | AAA |
| Secondary button | 7.93:1 | AAA |
| Muted text | 8.57:1 | AAA |
| Accent | 7.86:1 | AAA |
| Destructive | 6.07:1 | AA |
| Text on background | 19.78:1 | AAA |
| Text on card | 20.01:1 | AAA |
| Primary button | 11.61:1 | AAA |
| Secondary button | 8.19:1 | AAA |
| Muted text | 10.46:1 | AAA |
| Accent | 8.03:1 | AAA |
| Destructive | 3.71:1 | AA Large |
Paste this into your globals.css to use Loyal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 310.414);
--foreground: oklch(0.08 0.021 312.528);
--muted: oklch(0.937 0.018 310.262);
--muted-foreground: oklch(0.371 0 168.69);
--popover: oklch(0.991 0.003 310.414);
--popover-foreground: oklch(0.08 0.021 312.528);
--card: oklch(0.982 0.005 310.389);
--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.123 0.045 310.539);
--primary-foreground: oklch(0.828 0.097 309.339);
--secondary: oklch(0.855 0.026 310.157);
--secondary-foreground: oklch(0.329 0.044 309.183);
--accent: oklch(0.777 0.054 309.789);
--accent-foreground: oklch(0.249 0.043 308.799);
--destructive: oklch(0.49 0.161 35.084);
--destructive-foreground: oklch(0.965 0.015 35.967);
--ring: oklch(0.123 0.045 310.539);
--chart-1: oklch(0.123 0.045 310.539);
--chart-2: oklch(0.855 0.026 310.157);
--chart-3: oklch(0.777 0.054 309.789);
--chart-4: oklch(0.881 0.021 310.215);
--chart-5: oklch(0.122 0.047 310.573);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.015 311.387);
--foreground: oklch(0.991 0.002 310.421);
--muted: oklch(0.169 0.027 308.93);
--muted-foreground: oklch(0.805 0 169.695);
--popover: oklch(0.124 0.015 311.387);
--popover-foreground: oklch(0.991 0.002 310.421);
--card: oklch(0.137 0.017 310.275);
--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.123 0.045 310.539);
--primary-foreground: oklch(0.828 0.097 309.339);
--secondary: oklch(0.214 0.003 310.297);
--secondary-foreground: oklch(0.761 0.007 310.352);
--accent: oklch(0.302 0.017 309.921);
--accent-foreground: oklch(0.829 0.014 310.275);
--destructive: oklch(0.637 0.199 35.538);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.123 0.045 310.539);
--chart-1: oklch(0.123 0.045 310.539);
--chart-2: oklch(0.214 0.003 310.297);
--chart-3: oklch(0.302 0.017 309.921);
--chart-4: oklch(0.246 0.004 310.285);
--chart-5: oklch(0.122 0.047 310.573);
}