Loyal is a shadcn/ui theme built around a vivid blue primary color (#2450f0) with vivid yellow accents (#f0c424). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid blue primary (#2450f0) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020203black |
| Foreground | #050914black | #f8f9fcghostwhite |
| Card | #fcfcfcsnow | #040407black |
| Card foreground | #040710black | #fbfcfdwhite |
| Popover | #fcfcfcsnow | #040407black |
| Popover foreground | #040710black | #fbfcfdwhite |
| Primary | #2450f0royalblue | #2450f0royalblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #f0c424goldenrod | #f0c424goldenrod |
| Secondary foreground | #433505darkolivegreen | #433505darkolivegreen |
| Muted | #ecece9linen | #161513black |
| Muted foreground | #6c6960dimgray | #9f9c93darkgray |
| Accent | #f0c424goldenrod | #f0c424goldenrod |
| Accent foreground | #433505darkolivegreen | #433505darkolivegreen |
| Destructive | #78320dsaddlebrown | #d05716chocolate |
| Destructive foreground | #f8d3bepeachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2450f0royalblue | #2450f0royalblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.89:1 | AAA |
| Text on card | 19.70:1 | AAA |
| Primary button | 6.04:1 | AA |
| Secondary button | 7.18:1 | AAA |
| Muted text | 4.62:1 | AA |
| Accent | 7.18:1 | AAA |
| Destructive | 6.64:1 | AA |
| Text on background | 19.69:1 | AAA |
| Text on card | 19.92:1 | AAA |
| Primary button | 6.04:1 | AA |
| Secondary button | 7.18:1 | AAA |
| Muted text | 6.63:1 | AA |
| Accent | 7.18:1 | AAA |
| Destructive | 4.16:1 | AA Large |
Paste this into your globals.css to use Loyal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.141 0.026 268.672);
--muted: oklch(0.941 0.004 93.905);
--muted-foreground: oklch(0.522 0.015 94.153);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.13 0.022 267.623);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.13 0.022 267.623);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.516 0.243 265.555);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.834 0.163 91.382);
--secondary-foreground: oklch(0.335 0.065 92.132);
--accent: oklch(0.834 0.163 91.382);
--accent-foreground: oklch(0.335 0.065 92.132);
--destructive: oklch(0.409 0.108 44.467);
--destructive-foreground: oklch(0.892 0.05 49.986);
--ring: oklch(0.516 0.243 265.555);
--chart-1: oklch(0.516 0.243 265.555);
--chart-2: oklch(0.834 0.163 91.382);
--chart-3: oklch(0.834 0.163 91.382);
--chart-4: oklch(0.843 0.16 92.221);
--chart-5: oklch(0.515 0.25 265.322);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.087 0.007 270.544);
--foreground: oklch(0.982 0.004 273.818);
--muted: oklch(0.197 0.005 94.128);
--muted-foreground: oklch(0.694 0.014 94.074);
--popover: oklch(0.109 0.008 270.544);
--popover-foreground: oklch(0.991 0.002 273.842);
--card: oklch(0.109 0.008 270.544);
--card-foreground: oklch(0.991 0.002 273.842);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.516 0.243 265.555);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.834 0.163 91.382);
--secondary-foreground: oklch(0.335 0.065 92.132);
--accent: oklch(0.834 0.163 91.382);
--accent-foreground: oklch(0.335 0.065 92.132);
--destructive: oklch(0.604 0.168 43.46);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.516 0.243 265.555);
--chart-1: oklch(0.516 0.243 265.555);
--chart-2: oklch(0.834 0.163 91.382);
--chart-3: oklch(0.834 0.163 91.382);
--chart-4: oklch(0.843 0.16 92.221);
--chart-5: oklch(0.515 0.25 265.322);
}