Preface is a shadcn/ui theme built around a vivid orange primary color (#dc8409) with vivid blue accents (#0961dc). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the vivid orange primary (#dc8409) on an orange-tinted background (#0e0b06).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfaf7snow | #0e0b06black |
| Foreground | #160e03black | #fdfdfcwhite |
| Card | #fcf8f3floralwhite | #120e08black |
| Card foreground | #120b03black | #ffffffwhite |
| Popover | #fdfaf7snow | #0e0b06black |
| Popover foreground | #160e03black | #fdfdfcwhite |
| Primary | #dc8409chocolate | #dc8409chocolate |
| Primary foreground | #180f01black | #180f01black |
| Secondary | #0961dcroyalblue | #0961dcroyalblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dbdde1gainsboro | #1e2124black |
| Muted foreground | #54585fdimgray | #a0a5abdarkgray |
| Accent | #0961dcroyalblue | #0961dcroyalblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #681508maroon | #d92c12firebrick |
| Destructive foreground | #f8b4aalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #dc8409chocolate | #dc8409chocolate |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.42:1 | AAA |
| Text on card | 18.47:1 | AAA |
| Primary button | 6.65:1 | AA |
| Secondary button | 5.57:1 | AA |
| Muted text | 5.26:1 | AA |
| Accent | 5.57:1 | AA |
| Destructive | 7.12:1 | AAA |
| Text on background | 19.30:1 | AAA |
| Text on card | 19.28:1 | AAA |
| Primary button | 6.65:1 | AA |
| Secondary button | 5.57:1 | AA |
| Muted text | 6.53:1 | AA |
| Accent | 5.57:1 | AA |
| Destructive | 4.85:1 | AA |
Paste this into your globals.css to use Preface in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.005 76.629);
--foreground: oklch(0.172 0.027 78.297);
--muted: oklch(0.898 0.005 256.676);
--muted-foreground: oklch(0.46 0.012 256.738);
--popover: oklch(0.987 0.005 76.629);
--popover-foreground: oklch(0.172 0.027 78.297);
--card: oklch(0.981 0.008 76.616);
--card-foreground: oklch(0.157 0.024 80.994);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.693 0.154 64.567);
--primary-foreground: oklch(0.176 0.034 79.358);
--secondary: oklch(0.526 0.203 259.534);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.526 0.203 259.534);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.341 0.118 31.679);
--destructive-foreground: oklch(0.832 0.081 28.74);
--ring: oklch(0.693 0.154 64.567);
--chart-1: oklch(0.693 0.154 64.567);
--chart-2: oklch(0.526 0.203 259.534);
--chart-3: oklch(0.526 0.203 259.534);
--chart-4: oklch(0.551 0.214 259.588);
--chart-5: oklch(0.698 0.157 63.864);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.151 0.012 78.616);
--foreground: oklch(0.993 0.001 76.645);
--muted: oklch(0.245 0.008 256.752);
--muted-foreground: oklch(0.72 0.01 256.706);
--popover: oklch(0.151 0.012 78.616);
--popover-foreground: oklch(0.993 0.001 76.645);
--card: oklch(0.165 0.013 76.554);
--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.693 0.154 64.567);
--primary-foreground: oklch(0.176 0.034 79.358);
--secondary: oklch(0.526 0.203 259.534);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.526 0.203 259.534);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.574 0.211 31.471);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.693 0.154 64.567);
--chart-1: oklch(0.693 0.154 64.567);
--chart-2: oklch(0.526 0.203 259.534);
--chart-3: oklch(0.526 0.203 259.534);
--chart-4: oklch(0.551 0.214 259.588);
--chart-5: oklch(0.698 0.157 63.864);
}