Absence is a shadcn/ui theme built around a near-black primary color (#04010a) with muted light violet accents (#d2cfd8). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#04010a) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050307black |
| Foreground | #040209black | #f7f5f9whitesmoke |
| Card | #ffffffwhite | #050307black |
| Card foreground | #040209black | #f7f5f9whitesmoke |
| Popover | #ffffffwhite | #050307black |
| Popover foreground | #040209black | #f7f5f9whitesmoke |
| Primary | #04010ablack | #04010ablack |
| Primary foreground | #c6a8faplum | #c6a8faplum |
| Secondary | #d2cfd8lightgrey | #201d25black |
| Secondary foreground | #393541darkslategray | #b8b1c3silver |
| Muted | #e9e6eflavender | #131019black |
| Muted foreground | #5e556ddimgray | #9b92aadarkgray |
| Accent | #d2cfd8lightgrey | #201d25black |
| Accent foreground | #393541darkslategray | #b8b1c3silver |
| Destructive | #993f0fsaddlebrown | #e86017chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #04010ablack | #04010ablack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.63:1 | AAA |
| Text on card | 20.63:1 | AAA |
| Primary button | 10.26:1 | AAA |
| Secondary button | 7.78:1 | AAA |
| Muted text | 5.67:1 | AA |
| Accent | 7.78:1 | AAA |
| Destructive | 6.80:1 | AA |
| Text on background | 18.96:1 | AAA |
| Text on card | 18.96:1 | AAA |
| Primary button | 10.26:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 6.36:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 6.12:1 | AA |
Paste this into your globals.css to use Absence in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.096 0.027 304.026);
--muted: oklch(0.93 0.014 302.705);
--muted-foreground: oklch(0.467 0.038 301.666);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.096 0.027 304.026);
--card: oklch(1 0 180);
--card-foreground: oklch(0.096 0.027 304.026);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.088 0.037 304.578);
--primary-foreground: oklch(0.788 0.118 300.582);
--secondary: oklch(0.861 0.012 302.711);
--secondary-foreground: oklch(0.337 0.021 301.974);
--accent: oklch(0.861 0.012 302.711);
--accent-foreground: oklch(0.337 0.021 301.974);
--destructive: oklch(0.484 0.133 43.827);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.088 0.037 304.578);
--chart-1: oklch(0.088 0.037 304.578);
--chart-2: oklch(0.861 0.012 302.711);
--chart-3: oklch(0.861 0.012 302.711);
--chart-4: oklch(0.886 0.01 302.755);
--chart-5: oklch(0.087 0.039 304.678);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.105 0.015 303.481);
--foreground: oklch(0.973 0.006 302.84);
--muted: oklch(0.18 0.02 301.165);
--muted-foreground: oklch(0.677 0.035 302.137);
--popover: oklch(0.105 0.015 303.481);
--popover-foreground: oklch(0.973 0.006 302.84);
--card: oklch(0.105 0.015 303.481);
--card-foreground: oklch(0.973 0.006 302.84);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.088 0.037 304.578);
--primary-foreground: oklch(0.788 0.118 300.582);
--secondary: oklch(0.237 0.017 301.839);
--secondary-foreground: oklch(0.772 0.026 302.413);
--accent: oklch(0.237 0.017 301.839);
--accent-foreground: oklch(0.772 0.026 302.413);
--destructive: oklch(0.654 0.185 43.125);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.088 0.037 304.578);
--chart-1: oklch(0.088 0.037 304.578);
--chart-2: oklch(0.237 0.017 301.839);
--chart-3: oklch(0.237 0.017 301.839);
--chart-4: oklch(0.267 0.02 301.77);
--chart-5: oklch(0.087 0.039 304.678);
}