Trusty is a shadcn/ui theme built around an indigo primary color (#9c93eb) with green accents (#e2eb93). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the indigo primary (#9c93eb) on an indigo-tinted background (#08070d).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbfeghostwhite | #08070dblack |
| Foreground | #040212black | #f5f5fawhitesmoke |
| Card | #f7f7fdghostwhite | #090911black |
| Card foreground | #03020dblack | #f8f8fcghostwhite |
| Popover | #fbfbfeghostwhite | #08070dblack |
| Popover foreground | #040212black | #f5f5fawhitesmoke |
| Primary | #9c93ebmediumpurple | #9c93ebmediumpurple |
| Primary foreground | #110c41midnightblue | #110c41midnightblue |
| Secondary | #e2eb93khaki | #e2eb93khaki |
| Secondary foreground | #3b410cdarkolivegreen | #3b410cdarkolivegreen |
| Muted | #e7eacdantiquewhite | #2f3215darkslategray |
| Muted foreground | #5f614cdimgray | #b1b39edarkgray |
| Accent | #e2eb93khaki | #e2eb93khaki |
| Accent foreground | #3b410cdarkolivegreen | #3b410cdarkolivegreen |
| Destructive | #a20702darkred | #fd1a12red |
| Destructive foreground | #ffd8d7mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9c93ebmediumpurple | #9c93ebmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.86:1 | AAA |
| Text on card | 19.29:1 | AAA |
| Primary button | 6.77:1 | AA |
| Secondary button | 8.51:1 | AAA |
| Muted text | 5.14:1 | AA |
| Accent | 8.51:1 | AAA |
| Destructive | 6.27:1 | AA |
| Text on background | 18.47:1 | AAA |
| Text on card | 18.73:1 | AAA |
| Primary button | 6.77:1 | AA |
| Secondary button | 8.51:1 | AAA |
| Muted text | 6.17:1 | AA |
| Accent | 8.51:1 | AAA |
| Destructive | 3.95:1 | AA Large |
Paste this into your globals.css to use Trusty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.004 290.931);
--foreground: oklch(0.111 0.04 285.142);
--muted: oklch(0.926 0.038 111.773);
--muted-foreground: oklch(0.485 0.032 112.235);
--popover: oklch(0.989 0.004 290.931);
--popover-foreground: oklch(0.111 0.04 285.142);
--card: oklch(0.977 0.009 290.846);
--card-foreground: oklch(0.1 0.035 286.034);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.707 0.127 287.269);
--primary-foreground: oklch(0.206 0.095 278.518);
--secondary: oklch(0.915 0.111 113.265);
--secondary-foreground: oklch(0.358 0.073 115.139);
--accent: oklch(0.915 0.111 113.265);
--accent-foreground: oklch(0.358 0.073 115.139);
--destructive: oklch(0.449 0.181 29.574);
--destructive-foreground: oklch(0.914 0.043 20.313);
--ring: oklch(0.707 0.127 287.269);
--chart-1: oklch(0.707 0.127 287.269);
--chart-2: oklch(0.915 0.111 113.265);
--chart-3: oklch(0.915 0.111 113.265);
--chart-4: oklch(0.924 0.099 112.988);
--chart-5: oklch(0.703 0.132 287.059);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.133 0.015 289.436);
--foreground: oklch(0.971 0.007 290.875);
--muted: oklch(0.306 0.046 113.824);
--muted-foreground: oklch(0.758 0.029 111.725);
--popover: oklch(0.133 0.015 289.436);
--popover-foreground: oklch(0.971 0.007 290.875);
--card: oklch(0.144 0.018 288.779);
--card-foreground: oklch(0.981 0.005 290.923);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.707 0.127 287.269);
--primary-foreground: oklch(0.206 0.095 278.518);
--secondary: oklch(0.915 0.111 113.265);
--secondary-foreground: oklch(0.358 0.073 115.139);
--accent: oklch(0.915 0.111 113.265);
--accent-foreground: oklch(0.358 0.073 115.139);
--destructive: oklch(0.63 0.25 29.181);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.707 0.127 287.269);
--chart-1: oklch(0.707 0.127 287.269);
--chart-2: oklch(0.915 0.111 113.265);
--chart-3: oklch(0.915 0.111 113.265);
--chart-4: oklch(0.924 0.099 112.988);
--chart-5: oklch(0.703 0.132 287.059);
}