Period is a shadcn/ui theme built around a muted violet primary color (#5f4f6d) with muted light violet accents (#d2c6dd). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted violet primary (#5f4f6d) on a violet-tinted background (#08050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfewhite | #08050ablack |
| Foreground | #08040cblack | #fcfcfdwhite |
| Card | #fdfbfewhite | #08050ablack |
| Card foreground | #08040cblack | #fcfcfdwhite |
| Popover | #fdfbfewhite | #08050ablack |
| Popover foreground | #08040cblack | #fcfcfdwhite |
| Primary | #5f4f6ddimgray | #5f4f6ddimgray |
| Primary foreground | #f7f6f9whitesmoke | #f7f6f9whitesmoke |
| Secondary | #ded9e3gainsboro | #262429darkslategray |
| Secondary foreground | #463a50darkslategray | #c0bbc3silver |
| Muted | #dfd4e8gainsboro | #22172bblack |
| Muted foreground | #433a4bdarkslategray | #bdb4c5silver |
| Accent | #d2c6ddthistle | #39313fdarkslategray |
| Accent foreground | #392a46darkslategray | #d1ccd7lightgrey |
| Destructive | #651701maroon | #fd4d1corangered |
| Destructive foreground | #feb09alightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5f4f6ddimgray | #5f4f6ddimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.72:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 7.62:1 | AAA |
| Muted text | 7.55:1 | AAA |
| Accent | 8.04:1 | AAA |
| Destructive | 7.10:1 | AAA |
| Text on background | 19.77:1 | AAA |
| Text on card | 19.77:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 8.14:1 | AAA |
| Muted text | 8.55:1 | AAA |
| Accent | 7.89:1 | AAA |
| Destructive | 3.37:1 | AA Large |
Paste this into your globals.css to use Period in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 309.741);
--foreground: oklch(0.118 0.025 311.175);
--muted: oklch(0.884 0.029 309.458);
--muted-foreground: oklch(0.364 0.032 308.926);
--popover: oklch(0.99 0.004 309.741);
--popover-foreground: oklch(0.118 0.025 311.175);
--card: oklch(0.99 0.004 309.741);
--card-foreground: oklch(0.118 0.025 311.175);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.456 0.052 308.65);
--primary-foreground: oklch(0.975 0.004 309.749);
--secondary: oklch(0.891 0.016 309.612);
--secondary-foreground: oklch(0.369 0.04 308.706);
--accent: oklch(0.842 0.034 309.384);
--accent-foreground: oklch(0.315 0.052 308.09);
--destructive: oklch(0.336 0.115 35.513);
--destructive-foreground: oklch(0.826 0.097 36.113);
--ring: oklch(0.456 0.052 308.65);
--chart-1: oklch(0.456 0.052 308.65);
--chart-2: oklch(0.891 0.016 309.612);
--chart-3: oklch(0.842 0.034 309.384);
--chart-4: oklch(0.917 0.012 309.656);
--chart-5: oklch(0.452 0.062 308.415);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.016 310.816);
--foreground: oklch(0.992 0.001 309.777);
--muted: oklch(0.229 0.04 307.985);
--muted-foreground: oklch(0.783 0.026 309.455);
--popover: oklch(0.123 0.016 310.816);
--popover-foreground: oklch(0.992 0.001 309.777);
--card: oklch(0.123 0.016 310.816);
--card-foreground: oklch(0.992 0.001 309.777);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.456 0.052 308.65);
--primary-foreground: oklch(0.975 0.004 309.749);
--secondary: oklch(0.265 0.009 309.444);
--secondary-foreground: oklch(0.799 0.012 309.642);
--accent: oklch(0.328 0.025 309.021);
--accent-foreground: oklch(0.852 0.016 309.595);
--destructive: oklch(0.664 0.22 35);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.456 0.052 308.65);
--chart-1: oklch(0.456 0.052 308.65);
--chart-2: oklch(0.265 0.009 309.444);
--chart-3: oklch(0.328 0.025 309.021);
--chart-4: oklch(0.295 0.011 309.428);
--chart-5: oklch(0.452 0.062 308.415);
}