Policy is a shadcn/ui theme built around a vivid deep blue primary color (#0e1a81) with vivid deep violet accents (#3c0e81). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid deep blue primary (#0e1a81) on a neutral background (#010104).
| Token | Light | Dark |
|---|---|---|
| Background | #f8f8fcghostwhite | #010104black |
| Foreground | #030511black | #ffffffwhite |
| Card | #f4f5fbwhitesmoke | #020308black |
| Card foreground | #02030dblack | #ffffffwhite |
| Popover | #f8f8fcghostwhite | #010104black |
| Popover foreground | #030511black | #ffffffwhite |
| Primary | #0e1a81midnightblue | #0e1a81midnightblue |
| Primary foreground | #c8cdf9lightblue | #c8cdf9lightblue |
| Secondary | #0e5381teal | #0e5381teal |
| Secondary foreground | #c8e5f9paleturquoise | #c8e5f9paleturquoise |
| Muted | #d4e0e7gainsboro | #18232bblack |
| Muted foreground | #5e6468dimgray | #979da1darkgray |
| Accent | #3c0e81indigo | #3c0e81indigo |
| Accent foreground | #dcc8f9lavender | #dcc8f9lavender |
| Destructive | #730802maroon | #fb372dorangered |
| Destructive foreground | #fdaeaalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0e1a81midnightblue | #0e1a81midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.18:1 | AAA |
| Text on card | 18.86:1 | AAA |
| Primary button | 9.16:1 | AAA |
| Secondary button | 6.24:1 | AA |
| Muted text | 4.45:1 | AA Large |
| Accent | 8.70:1 | AAA |
| Destructive | 6.69:1 | AA |
| Text on background | 20.79:1 | AAA |
| Text on card | 20.59:1 | AAA |
| Primary button | 9.16:1 | AAA |
| Secondary button | 6.24:1 | AA |
| Muted text | 5.82:1 | AA |
| Accent | 8.70:1 | AAA |
| Destructive | 3.69:1 | AA Large |
Paste this into your globals.css to use Policy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.005 281.201);
--foreground: oklch(0.119 0.031 273.306);
--muted: oklch(0.9 0.016 236.699);
--muted-foreground: oklch(0.501 0.01 236.72);
--popover: oklch(0.98 0.005 281.201);
--popover-foreground: oklch(0.119 0.031 273.306);
--card: oklch(0.97 0.008 281.155);
--card-foreground: oklch(0.108 0.027 273.162);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.304 0.167 267.397);
--primary-foreground: oklch(0.858 0.061 280.039);
--secondary: oklch(0.426 0.099 244.497);
--secondary-foreground: oklch(0.908 0.041 237.132);
--accent: oklch(0.327 0.168 291.968);
--accent-foreground: oklch(0.864 0.07 303.182);
--destructive: oklch(0.353 0.139 29.911);
--destructive-foreground: oklch(0.826 0.094 22.631);
--ring: oklch(0.304 0.167 267.397);
--chart-1: oklch(0.304 0.167 267.397);
--chart-2: oklch(0.426 0.099 244.497);
--chart-3: oklch(0.327 0.168 291.968);
--chart-4: oklch(0.457 0.107 244.695);
--chart-5: oklch(0.303 0.172 266.885);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.079 0.014 275.933);
--foreground: oklch(1 0 180);
--muted: oklch(0.249 0.022 237.962);
--muted-foreground: oklch(0.691 0.009 236.624);
--popover: oklch(0.079 0.014 275.933);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.1 0.017 275.933);
--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.304 0.167 267.397);
--primary-foreground: oklch(0.858 0.061 280.039);
--secondary: oklch(0.426 0.099 244.497);
--secondary-foreground: oklch(0.908 0.041 237.132);
--accent: oklch(0.327 0.168 291.968);
--accent-foreground: oklch(0.864 0.07 303.182);
--destructive: oklch(0.644 0.231 28.647);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.304 0.167 267.397);
--chart-1: oklch(0.304 0.167 267.397);
--chart-2: oklch(0.426 0.099 244.497);
--chart-3: oklch(0.327 0.168 291.968);
--chart-4: oklch(0.457 0.107 244.695);
--chart-5: oklch(0.303 0.172 266.885);
}