Crystallography is a shadcn/ui theme built around a vivid violet primary color (#ba6feb) with vivid teal accents (#6febba). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#ba6feb) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050307black |
| Foreground | #030104black | #ffffffwhite |
| Card | #ffffffwhite | #050307black |
| Card foreground | #030104black | #ffffffwhite |
| Popover | #ffffffwhite | #050307black |
| Popover foreground | #030104black | #ffffffwhite |
| Primary | #ba6febmediumorchid | #ba6febmediumorchid |
| Primary foreground | #180524black | #180524black |
| Secondary | #ebba6fburlywood | #ebba6fburlywood |
| Secondary foreground | #241805black | #241805black |
| Muted | #ebe3d5antiquewhite | #2a2114black |
| Muted foreground | #64594adimgray | #b5ab9bdarkgray |
| Accent | #6febbamediumaquamarine | #6febbamediumaquamarine |
| Accent foreground | #052418black | #052418black |
| Destructive | #7e0301maroon | #f70702red |
| Destructive foreground | #feb5b3lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ba6febmediumorchid | #ba6febmediumorchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.79:1 | AAA |
| Text on card | 20.79:1 | AAA |
| Primary button | 6.05:1 | AA |
| Secondary button | 9.75:1 | AAA |
| Muted text | 5.36:1 | AA |
| Accent | 11.25:1 | AAA |
| Destructive | 6.54:1 | AA |
| Text on background | 20.50:1 | AAA |
| Text on card | 20.50:1 | AAA |
| Primary button | 6.05:1 | AA |
| Secondary button | 9.75:1 | AAA |
| Muted text | 7.00:1 | AAA |
| Accent | 11.25:1 | AAA |
| Destructive | 4.20:1 | AA Large |
Paste this into your globals.css to use Crystallography in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.082 0.018 314.245);
--muted: oklch(0.918 0.02 78.227);
--muted-foreground: oklch(0.471 0.028 77.952);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.082 0.018 314.245);
--card: oklch(1 0 180);
--card-foreground: oklch(0.082 0.018 314.245);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.675 0.188 309.99);
--primary-foreground: oklch(0.169 0.065 309.21);
--secondary: oklch(0.817 0.109 76.408);
--secondary-foreground: oklch(0.218 0.037 75.92);
--accent: oklch(0.857 0.133 164.732);
--accent-foreground: oklch(0.233 0.044 163.083);
--destructive: oklch(0.375 0.151 29.387);
--destructive-foreground: oklch(0.84 0.086 20.138);
--ring: oklch(0.675 0.188 309.99);
--chart-1: oklch(0.675 0.188 309.99);
--chart-2: oklch(0.817 0.109 76.408);
--chart-3: oklch(0.857 0.133 164.732);
--chart-4: oklch(0.834 0.099 76.854);
--chart-5: oklch(0.673 0.194 309.867);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.108 0.015 313.548);
--foreground: oklch(1 0 180);
--muted: oklch(0.253 0.027 77.221);
--muted-foreground: oklch(0.745 0.025 78.162);
--popover: oklch(0.108 0.015 313.548);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.108 0.015 313.548);
--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.675 0.188 309.99);
--primary-foreground: oklch(0.169 0.065 309.21);
--secondary: oklch(0.817 0.109 76.408);
--secondary-foreground: oklch(0.218 0.037 75.92);
--accent: oklch(0.857 0.133 164.732);
--accent-foreground: oklch(0.233 0.044 163.083);
--destructive: oklch(0.615 0.251 29.3);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.675 0.188 309.99);
--chart-1: oklch(0.675 0.188 309.99);
--chart-2: oklch(0.817 0.109 76.408);
--chart-3: oklch(0.857 0.133 164.732);
--chart-4: oklch(0.834 0.099 76.854);
--chart-5: oklch(0.673 0.194 309.867);
}