Elastic is a shadcn/ui theme built around a near-black primary color (#0f100e) with near-black accents (#100e0f). The light mode uses a neutral background (#fdfefb). Dark mode keeps the near-black primary (#0f100e) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfefbwhite | #000000black |
| Foreground | #030401black | #fdfdfcwhite |
| Card | #fafdf7mintcream | #030303black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdfefbwhite | #000000black |
| Popover foreground | #030401black | #fdfdfcwhite |
| Primary | #0f100eblack | #0f100eblack |
| Primary foreground | #a9aea3darkgray | #a9aea3darkgray |
| Secondary | #0e0f10black | #0e0f10black |
| Secondary foreground | #a3a9aedarkgray | #a3a9aedarkgray |
| Muted | #ebf1f4whitesmoke | #0b1014black |
| Muted foreground | #465158darkslategray | #a7b2b9darkgray |
| Accent | #100e0fblack | #100e0fblack |
| Accent foreground | #aea3a9darkgray | #aea3a9darkgray |
| Destructive | #b0170cfirebrick | #f13f32tomato |
| Destructive foreground | #fef2f1seashell | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0f100eblack | #0f100eblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.27:1 | AAA |
| Text on card | 20.42:1 | AAA |
| Primary button | 8.40:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 7.12:1 | AAA |
| Accent | 7.86:1 | AAA |
| Destructive | 6.42:1 | AA |
| Text on background | 20.63:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 8.40:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 8.83:1 | AAA |
| Accent | 7.86:1 | AAA |
| Destructive | 3.83:1 | AA Large |
Paste this into your globals.css to use Elastic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.004 124.399);
--foreground: oklch(0.104 0.02 123.464);
--muted: oklch(0.954 0.007 236.547);
--muted-foreground: oklch(0.428 0.018 237.065);
--popover: oklch(0.995 0.004 124.399);
--popover-foreground: oklch(0.104 0.02 123.464);
--card: oklch(0.99 0.007 124.453);
--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.172 0.004 124.672);
--primary-foreground: oklch(0.743 0.015 124.643);
--secondary: oklch(0.17 0.002 236.637);
--secondary-foreground: oklch(0.732 0.009 236.619);
--accent: oklch(0.168 0.004 340.737);
--accent-foreground: oklch(0.726 0.015 340.692);
--destructive: oklch(0.485 0.187 29.709);
--destructive-foreground: oklch(0.969 0.013 22.373);
--ring: oklch(0.172 0.004 124.672);
--chart-1: oklch(0.172 0.004 124.672);
--chart-2: oklch(0.17 0.002 236.637);
--chart-3: oklch(0.168 0.004 340.737);
--chart-4: oklch(0.204 0.003 236.676);
--chart-5: oklch(0.174 0.006 124.832);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.993 0.001 124.361);
--muted: oklch(0.17 0.011 237.509);
--muted-foreground: oklch(0.757 0.015 236.733);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.993 0.001 124.361);
--card: oklch(0.092 0 180);
--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.172 0.004 124.672);
--primary-foreground: oklch(0.743 0.015 124.643);
--secondary: oklch(0.17 0.002 236.637);
--secondary-foreground: oklch(0.732 0.009 236.619);
--accent: oklch(0.168 0.004 340.737);
--accent-foreground: oklch(0.726 0.015 340.692);
--destructive: oklch(0.633 0.216 28.881);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.172 0.004 124.672);
--chart-1: oklch(0.172 0.004 124.672);
--chart-2: oklch(0.17 0.002 236.637);
--chart-3: oklch(0.168 0.004 340.737);
--chart-4: oklch(0.204 0.003 236.676);
--chart-5: oklch(0.174 0.006 124.832);
}