Rust is a shadcn/ui theme built around a neutral gray primary color (#27262b) with neutral gray accents (#29262b). The light mode uses a neutral background (#f8f7fc). Dark mode keeps the neutral gray primary (#27262b) on a neutral background (#020208).
| Token | Light | Dark |
|---|---|---|
| Background | #f8f7fcghostwhite | #020208black |
| Foreground | #020109black | #fcfcfdwhite |
| Card | #f4f4fbwhitesmoke | #04030cblack |
| Card foreground | #010105black | #ffffffwhite |
| Popover | #f8f7fcghostwhite | #020208black |
| Popover foreground | #020109black | #fcfcfdwhite |
| Primary | #27262bdarkslategray | #27262bdarkslategray |
| Primary foreground | #bebec5silver | #bebec5silver |
| Secondary | #26292bdarkslategray | #26292bdarkslategray |
| Secondary foreground | #bec1c5silver | #bec1c5silver |
| Muted | #eaeff5lavender | #0a0f15black |
| Muted foreground | #57606bdimgray | #949da8darkgray |
| Accent | #29262bdarkslategray | #29262bdarkslategray |
| Accent foreground | #c2bec5silver | #c2bec5silver |
| Destructive | #c8210efirebrick | #f25240tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #27262bdarkslategray | #27262bdarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.53:1 | AAA |
| Text on card | 18.99:1 | AAA |
| Primary button | 8.10:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 5.52:1 | AA |
| Accent | 8.12:1 | AAA |
| Destructive | 5.70:1 | AA |
| Text on background | 20.16:1 | AAA |
| Text on card | 20.52:1 | AAA |
| Primary button | 8.10:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 7.01:1 | AAA |
| Accent | 8.12:1 | AAA |
| Destructive | 6.04:1 | AA |
Paste this into your globals.css to use Rust in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.979 0.006 288.586);
--foreground: oklch(0.085 0.031 281.901);
--muted: oklch(0.951 0.01 253.288);
--muted-foreground: oklch(0.485 0.02 253.468);
--popover: oklch(0.979 0.006 288.586);
--popover-foreground: oklch(0.085 0.031 281.901);
--card: oklch(0.969 0.01 288.521);
--card-foreground: oklch(0.067 0.024 281.901);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.272 0.009 288.085);
--primary-foreground: oklch(0.804 0.01 288.471);
--secondary: oklch(0.278 0.006 253.355);
--secondary-foreground: oklch(0.811 0.007 253.275);
--accent: oklch(0.275 0.01 310.111);
--accent-foreground: oklch(0.807 0.011 310.31);
--destructive: oklch(0.536 0.203 30.497);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.272 0.009 288.085);
--chart-1: oklch(0.272 0.009 288.085);
--chart-2: oklch(0.278 0.006 253.355);
--chart-3: oklch(0.275 0.01 310.111);
--chart-4: oklch(0.308 0.007 253.36);
--chart-5: oklch(0.268 0.014 287.744);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.093 0.023 284.533);
--foreground: oklch(0.991 0.002 288.674);
--muted: oklch(0.165 0.015 253.712);
--muted-foreground: oklch(0.693 0.019 253.387);
--popover: oklch(0.093 0.023 284.533);
--popover-foreground: oklch(0.991 0.002 288.674);
--card: oklch(0.107 0.026 284.434);
--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.272 0.009 288.085);
--primary-foreground: oklch(0.804 0.01 288.471);
--secondary: oklch(0.278 0.006 253.355);
--secondary-foreground: oklch(0.811 0.007 253.275);
--accent: oklch(0.275 0.01 310.111);
--accent-foreground: oklch(0.807 0.011 310.31);
--destructive: oklch(0.655 0.199 29.701);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.272 0.009 288.085);
--chart-1: oklch(0.272 0.009 288.085);
--chart-2: oklch(0.278 0.006 253.355);
--chart-3: oklch(0.275 0.01 310.111);
--chart-4: oklch(0.308 0.007 253.36);
--chart-5: oklch(0.268 0.014 287.744);
}