Precious is a shadcn/ui theme built around a near-black primary color (#0a0105) with near-black accents (#0a0101). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#0a0105) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #0c0308black | #f8f7f7whitesmoke |
| Card | #ffffffwhite | #000000black |
| Card foreground | #0c0308black | #f8f7f7whitesmoke |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #0c0308black | #f8f7f7whitesmoke |
| Primary | #0a0105black | #0a0105black |
| Primary foreground | #f448a1hotpink | #f448a1hotpink |
| Secondary | #09010ablack | #09010ablack |
| Secondary foreground | #f148f4orchid | #f148f4orchid |
| Muted | #ded8dfgainsboro | #272027darkslategray |
| Muted foreground | #525252darkslategray | #adadaddarkgray |
| Accent | #0a0101black | #0a0101black |
| Accent foreground | #faa8aalightpink | #faa8aalightpink |
| Destructive | #7e0501maroon | #fd322borangered |
| Destructive foreground | #feb6b3lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0a0105black | #0a0105black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.34:1 | AAA |
| Text on card | 20.34:1 | AAA |
| Primary button | 6.18:1 | AA |
| Secondary button | 6.84:1 | AA |
| Muted text | 5.58:1 | AA |
| Accent | 11.07:1 | AAA |
| Destructive | 6.55:1 | AA |
| Text on background | 19.63:1 | AAA |
| Text on card | 19.63:1 | AAA |
| Primary button | 6.18:1 | AA |
| Secondary button | 6.84:1 | AA |
| Muted text | 7.05:1 | AAA |
| Accent | 11.07:1 | AAA |
| Destructive | 3.70:1 | AA Large |
Paste this into your globals.css to use Precious in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.122 0.025 344.479);
--muted: oklch(0.889 0.011 325.186);
--muted-foreground: oklch(0.437 0 180);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.122 0.025 344.479);
--card: oklch(1 0 180);
--card-foreground: oklch(0.122 0.025 344.479);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.1 0.036 344.042);
--primary-foreground: oklch(0.671 0.222 353.145);
--secondary: oklch(0.104 0.041 327.641);
--secondary-foreground: oklch(0.705 0.272 327.275);
--accent: oklch(0.095 0.032 23.406);
--accent-foreground: oklch(0.812 0.097 18.303);
--destructive: oklch(0.376 0.15 29.692);
--destructive-foreground: oklch(0.843 0.085 21.236);
--ring: oklch(0.1 0.036 344.042);
--chart-1: oklch(0.1 0.036 344.042);
--chart-2: oklch(0.104 0.041 327.641);
--chart-3: oklch(0.095 0.032 23.406);
--chart-4: oklch(0.15 0.062 327.5);
--chart-5: oklch(0.099 0.037 344.031);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.976 0.002 344.337);
--muted: oklch(0.255 0.015 325.5);
--muted-foreground: oklch(0.749 0 158.199);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.976 0.002 344.337);
--card: oklch(0 0 0);
--card-foreground: oklch(0.976 0.002 344.337);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.1 0.036 344.042);
--primary-foreground: oklch(0.671 0.222 353.145);
--secondary: oklch(0.104 0.041 327.641);
--secondary-foreground: oklch(0.705 0.272 327.275);
--accent: oklch(0.095 0.032 23.406);
--accent-foreground: oklch(0.812 0.097 18.303);
--destructive: oklch(0.644 0.237 28.295);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.1 0.036 344.042);
--chart-1: oklch(0.1 0.036 344.042);
--chart-2: oklch(0.104 0.041 327.641);
--chart-3: oklch(0.095 0.032 23.406);
--chart-4: oklch(0.15 0.062 327.5);
--chart-5: oklch(0.099 0.037 344.031);
}