Cofactor is a shadcn/ui theme built around a vivid orange primary color (#f2905f) with muted light orange accents (#d9cec9). The light mode uses a neutral background (#fdfcfb). Dark mode keeps the vivid orange primary (#f2905f) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfbsnow | #000000black |
| Foreground | #090402black | #fdfcfcsnow |
| Card | #fcf9f8snow | #030303black |
| Card foreground | #040201black | #ffffffwhite |
| Popover | #fdfcfbsnow | #000000black |
| Popover foreground | #090402black | #fdfcfcsnow |
| Primary | #f2905fsandybrown | #f2905fsandybrown |
| Primary foreground | #1c0b02black | #1c0b02black |
| Secondary | #ebe7e6linen | #353231darkslategray |
| Secondary foreground | #584c46darkolivegreen | #cecbcalightgrey |
| Muted | #f7f1edlinen | #120b08black |
| Muted foreground | #55463fdarkolivegreen | #c0b1aadarkgray |
| Accent | #d9cec9lightgrey | #534741darkslategray |
| Accent foreground | #42352fdarkslategray | #e6e2e0gainsboro |
| Destructive | #d5150bfirebrick | #f32b20crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f2905fsandybrown | #f2905fsandybrown |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.93:1 | AAA |
| Text on card | 19.78:1 | AAA |
| Primary button | 8.11:1 | AAA |
| Secondary button | 6.74:1 | AA |
| Muted text | 8.02:1 | AAA |
| Accent | 7.67:1 | AAA |
| Destructive | 5.31:1 | AA |
| Text on background | 20.50:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 8.11:1 | AAA |
| Secondary button | 7.84:1 | AAA |
| Muted text | 9.38:1 | AAA |
| Accent | 6.96:1 | AA |
| Destructive | 4.05:1 | AA Large |
Paste this into your globals.css to use Cofactor in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.002 48.729);
--foreground: oklch(0.114 0.016 59.535);
--muted: oklch(0.961 0.009 48.641);
--muted-foreground: oklch(0.408 0.024 48.118);
--popover: oklch(0.992 0.002 48.729);
--popover-foreground: oklch(0.114 0.016 59.535);
--card: oklch(0.984 0.004 48.707);
--card-foreground: oklch(0.091 0.013 59.535);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.746 0.136 46.51);
--primary-foreground: oklch(0.173 0.036 52.276);
--secondary: oklch(0.931 0.004 48.694);
--secondary-foreground: oklch(0.427 0.018 48.271);
--accent: oklch(0.86 0.014 48.561);
--accent-foreground: oklch(0.34 0.021 48.073);
--destructive: oklch(0.555 0.219 29.47);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.746 0.136 46.51);
--chart-1: oklch(0.746 0.136 46.51);
--chart-2: oklch(0.931 0.004 48.694);
--chart-3: oklch(0.86 0.014 48.561);
--chart-4: oklch(0.954 0.003 48.714);
--chart-5: oklch(0.748 0.14 46.387);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.992 0.001 48.743);
--muted: oklch(0.158 0.014 49.093);
--muted-foreground: oklch(0.772 0.02 48.449);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.992 0.001 48.743);
--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.746 0.136 46.51);
--primary-foreground: oklch(0.173 0.036 52.276);
--secondary: oklch(0.321 0.003 48.621);
--secondary-foreground: oklch(0.845 0.003 48.712);
--accent: oklch(0.408 0.019 48.236);
--accent-foreground: oklch(0.915 0.006 48.673);
--destructive: oklch(0.621 0.233 29.088);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.746 0.136 46.51);
--chart-1: oklch(0.746 0.136 46.51);
--chart-2: oklch(0.321 0.003 48.621);
--chart-3: oklch(0.408 0.019 48.236);
--chart-4: oklch(0.351 0.004 48.618);
--chart-5: oklch(0.748 0.14 46.387);
}