Ruling is a shadcn/ui theme built around a vivid deep indigo primary color (#050227) with vivid deep green accents (#022705). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the vivid deep indigo primary (#050227) on a neutral background (#030208).
| Token | Light | Dark |
|---|---|---|
| Background | #f7f7fdghostwhite | #030208black |
| Foreground | #010104black | #fcfcfdwhite |
| Card | #f3f3fcaliceblue | #04040cblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f3f3fcaliceblue | #04040cblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #050227black | #050227black |
| Primary foreground | #c9c4fdlightsteelblue | #c9c4fdlightsteelblue |
| Secondary | #270502black | #270502black |
| Secondary foreground | #f86f62salmon | #f86f62salmon |
| Muted | #f6efefwhitesmoke | #100a09black |
| Muted foreground | #4a3c3bdarkslategray | #c4b7b5silver |
| Accent | #022705black | #022705black |
| Accent foreground | #0aeb1dlime | #0aeb1dlime |
| Destructive | #c21d14firebrick | #e9342bcrimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #050227black | #050227black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.51:1 | AAA |
| Text on card | 19.01:1 | AAA |
| Primary button | 12.27:1 | AAA |
| Secondary button | 6.71:1 | AA |
| Muted text | 9.27:1 | AAA |
| Accent | 9.95:1 | AAA |
| Destructive | 6.04:1 | AA |
| Text on background | 20.12:1 | AAA |
| Text on card | 20.46:1 | AAA |
| Primary button | 12.27:1 | AAA |
| Secondary button | 6.71:1 | AA |
| Muted text | 10.08:1 | AAA |
| Accent | 9.95:1 | AAA |
| Destructive | 4.21:1 | AA Large |
Paste this into your globals.css to use Ruling in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.978 0.008 290.088);
--foreground: oklch(0.074 0.019 286.666);
--muted: oklch(0.958 0.007 23.648);
--muted-foreground: oklch(0.371 0.019 24.151);
--popover: oklch(0.966 0.012 290.004);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.966 0.012 290.004);
--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.138 0.077 275.955);
--primary-foreground: oklch(0.844 0.078 288.42);
--secondary: oklch(0.183 0.06 32.428);
--secondary-foreground: oklch(0.706 0.171 27.492);
--accent: oklch(0.238 0.073 144.404);
--accent-foreground: oklch(0.815 0.272 142.917);
--destructive: oklch(0.522 0.199 29.199);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.138 0.077 275.955);
--chart-1: oklch(0.138 0.077 275.955);
--chart-2: oklch(0.183 0.06 32.428);
--chart-3: oklch(0.238 0.073 144.404);
--chart-4: oklch(0.219 0.076 31.592);
--chart-5: oklch(0.136 0.08 274.972);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.097 0.02 287.473);
--foreground: oklch(0.991 0.001 290.22);
--muted: oklch(0.153 0.011 24.528);
--muted-foreground: oklch(0.789 0.015 23.779);
--popover: oklch(0.111 0.023 287.4);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.111 0.023 287.4);
--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.138 0.077 275.955);
--primary-foreground: oklch(0.844 0.078 288.42);
--secondary: oklch(0.183 0.06 32.428);
--secondary-foreground: oklch(0.706 0.171 27.492);
--accent: oklch(0.238 0.073 144.404);
--accent-foreground: oklch(0.815 0.272 142.917);
--destructive: oklch(0.61 0.217 28.57);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.138 0.077 275.955);
--chart-1: oklch(0.138 0.077 275.955);
--chart-2: oklch(0.183 0.06 32.428);
--chart-3: oklch(0.238 0.073 144.404);
--chart-4: oklch(0.219 0.076 31.592);
--chart-5: oklch(0.136 0.08 274.972);
}