Relative is a shadcn/ui theme built around a vivid light pink primary color (#fef1f8) with vivid light red accents (#fef1f1). The light mode uses a neutral background (#fefbfd). Dark mode keeps the vivid light pink primary (#fef1f8) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfdsnow | #000000black |
| Foreground | #0d0308black | #ffffffwhite |
| Card | #fefbfdsnow | #000000black |
| Card foreground | #0d0308black | #ffffffwhite |
| Popover | #fefbfdsnow | #000000black |
| Popover foreground | #0d0308black | #ffffffwhite |
| Primary | #fef1f8lavenderblush | #fef1f8lavenderblush |
| Primary foreground | #b00c67mediumvioletred | #b00c67mediumvioletred |
| Secondary | #fdf1feghostwhite | #fdf1feghostwhite |
| Secondary foreground | #4d0651indigo | #4d0651indigo |
| Muted | #ded3dfgainsboro | #2c202cdarkslategray |
| Muted foreground | #4d3c4edarkslategray | #c2b1c3silver |
| Accent | #fef1f1lavenderblush | #fef1f1lavenderblush |
| Accent foreground | #b00c14firebrick | #b00c14firebrick |
| Destructive | #da4207orangered | #f8652atomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fef1f8lavenderblush | #fef1f8lavenderblush |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.73:1 | AAA |
| Text on card | 19.73:1 | AAA |
| Primary button | 6.17:1 | AA |
| Secondary button | 13.12:1 | AAA |
| Muted text | 6.97:1 | AA |
| Accent | 6.54:1 | AA |
| Destructive | 4.40:1 | AA Large |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 6.17:1 | AA |
| Secondary button | 13.12:1 | AAA |
| Muted text | 7.67:1 | AAA |
| Accent | 6.54:1 | AA |
| Destructive | 6.88:1 | AA |
Paste this into your globals.css to use Relative in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.005 342.73);
--foreground: oklch(0.12 0.029 343.064);
--muted: oklch(0.879 0.021 324.266);
--muted-foreground: oklch(0.381 0.037 324.673);
--popover: oklch(0.99 0.005 342.73);
--popover-foreground: oklch(0.12 0.029 343.064);
--card: oklch(0.99 0.005 342.73);
--card-foreground: oklch(0.12 0.029 343.064);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.97 0.017 343.048);
--primary-foreground: oklch(0.498 0.198 355.894);
--secondary: oklch(0.971 0.022 324.261);
--secondary-foreground: oklch(0.303 0.133 325.85);
--accent: oklch(0.968 0.014 13.903);
--accent-foreground: oklch(0.481 0.191 27.189);
--destructive: oklch(0.595 0.196 37.004);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.97 0.017 343.048);
--chart-1: oklch(0.97 0.017 343.048);
--chart-2: oklch(0.971 0.022 324.261);
--chart-3: oklch(0.968 0.014 13.903);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.969 0.018 343.062);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.263 0.028 324.716);
--muted-foreground: oklch(0.781 0.031 324.359);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.97 0.017 343.048);
--primary-foreground: oklch(0.498 0.198 355.894);
--secondary: oklch(0.971 0.022 324.261);
--secondary-foreground: oklch(0.303 0.133 325.85);
--accent: oklch(0.968 0.014 13.903);
--accent-foreground: oklch(0.481 0.191 27.189);
--destructive: oklch(0.686 0.194 39.825);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.97 0.017 343.048);
--chart-1: oklch(0.97 0.017 343.048);
--chart-2: oklch(0.971 0.022 324.261);
--chart-3: oklch(0.968 0.014 13.903);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.969 0.018 343.062);
}