Loss is a shadcn/ui theme built around a blue primary color (#7796d4) with green accents (#96d477). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#7796d4) on a blue-tinted background (#05070b).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #05070bblack |
| Foreground | #020408black | #ffffffwhite |
| Card | #fcfcfcsnow | #06090eblack |
| Card foreground | #010204black | #ffffffwhite |
| Popover | #ffffffwhite | #05070bblack |
| Popover foreground | #020408black | #ffffffwhite |
| Primary | #7796d4cornflowerblue | #7796d4cornflowerblue |
| Primary foreground | #060b13black | #060b13black |
| Secondary | #d47796palevioletred | #d47796palevioletred |
| Secondary foreground | #13060bblack | #13060bblack |
| Muted | #e7cbd4thistle | #341822black |
| Muted foreground | #645e60dimgray | #a19b9ddarkgray |
| Accent | #96d477darkseagreen | #96d477darkseagreen |
| Accent foreground | #0b1306black | #0b1306black |
| Destructive | #d14900chocolate | #ff7429tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7796d4cornflowerblue | #7796d4cornflowerblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.51:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 6.68:1 | AA |
| Secondary button | 6.51:1 | AA |
| Muted text | 4.18:1 | AA Large |
| Accent | 10.81:1 | AAA |
| Destructive | 4.49:1 | AA Large |
| Text on background | 20.20:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 6.68:1 | AA |
| Secondary button | 6.51:1 | AA |
| Muted text | 5.90:1 | AA |
| Accent | 10.81:1 | AAA |
| Destructive | 7.77:1 | AAA |
Paste this into your globals.css to use Loss in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.105 0.016 254.997);
--muted: oklch(0.867 0.034 355.692);
--muted-foreground: oklch(0.488 0.008 355.057);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.105 0.016 254.997);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.084 0.013 254.997);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.676 0.099 263.58);
--primary-foreground: oklch(0.147 0.021 261.501);
--secondary: oklch(0.681 0.12 359.467);
--secondary-foreground: oklch(0.147 0.027 357.861);
--accent: oklch(0.807 0.139 135.918);
--accent-foreground: oklch(0.175 0.03 135.125);
--destructive: oklch(0.588 0.183 40.358);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.676 0.099 263.58);
--chart-1: oklch(0.676 0.099 263.58);
--chart-2: oklch(0.681 0.12 359.467);
--chart-3: oklch(0.807 0.139 135.918);
--chart-4: oklch(0.707 0.109 358.826);
--chart-5: oklch(0.673 0.104 263.502);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.012 259.053);
--foreground: oklch(1 0 180);
--muted: oklch(0.253 0.047 359.725);
--muted-foreground: oklch(0.696 0.007 354.89);
--popover: oklch(0.125 0.012 259.053);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.138 0.014 260.69);
--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.676 0.099 263.58);
--primary-foreground: oklch(0.147 0.021 261.501);
--secondary: oklch(0.681 0.12 359.467);
--secondary-foreground: oklch(0.147 0.027 357.861);
--accent: oklch(0.807 0.139 135.918);
--accent-foreground: oklch(0.175 0.03 135.125);
--destructive: oklch(0.715 0.188 44.596);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.676 0.099 263.58);
--chart-1: oklch(0.676 0.099 263.58);
--chart-2: oklch(0.681 0.12 359.467);
--chart-3: oklch(0.807 0.139 135.918);
--chart-4: oklch(0.707 0.109 358.826);
--chart-5: oklch(0.673 0.104 263.502);
}