Weakness is a shadcn/ui theme built around a violet primary color (#a07abd) with purple accents (#bd7ab9). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#a07abd) on a violet-tinted background (#0b050f).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0b050fblack |
| Foreground | #08030cblack | #ffffffwhite |
| Card | #ffffffwhite | #0b050fblack |
| Card foreground | #08030cblack | #ffffffwhite |
| Popover | #ffffffwhite | #0b050fblack |
| Popover foreground | #08030cblack | #ffffffwhite |
| Primary | #a07abdmediumpurple | #a07abdmediumpurple |
| Primary foreground | #000000black | #000000black |
| Secondary | #7e7abdmediumpurple | #7e7abdmediumpurple |
| Secondary foreground | #000000black | #000000black |
| Muted | #eae9f1lavender | #0e0e16black |
| Muted foreground | #474747darkslategray | #b8b8b8silver |
| Accent | #bd7ab9orchid | #bd7ab9orchid |
| Accent foreground | #030203black | #030203black |
| Destructive | #91140ddarkred | #ec3f36tomato |
| Destructive foreground | #fbd7d5mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a07abdmediumpurple | #a07abdmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.41:1 | AAA |
| Text on card | 20.41:1 | AAA |
| Primary button | 6.00:1 | AA |
| Secondary button | 5.39:1 | AA |
| Muted text | 7.70:1 | AAA |
| Accent | 6.55:1 | AA |
| Destructive | 6.85:1 | AA |
| Text on background | 20.12:1 | AAA |
| Text on card | 20.12:1 | AAA |
| Primary button | 6.00:1 | AA |
| Secondary button | 5.39:1 | AA |
| Muted text | 9.69:1 | AAA |
| Accent | 6.55:1 | AA |
| Destructive | 3.92:1 | AA Large |
Paste this into your globals.css to use Weakness in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.118 0.026 312.616);
--muted: oklch(0.937 0.011 289.257);
--muted-foreground: oklch(0.399 0 180);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.118 0.026 312.616);
--card: oklch(1 0 180);
--card-foreground: oklch(0.118 0.026 312.616);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.641 0.107 309.597);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.61 0.101 286.03);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.67 0.118 329.149);
--accent-foreground: oklch(0.088 0.012 328.375);
--destructive: oklch(0.422 0.159 29.14);
--destructive-foreground: oklch(0.909 0.041 21.499);
--ring: oklch(0.641 0.107 309.597);
--chart-1: oklch(0.641 0.107 309.597);
--chart-2: oklch(0.61 0.101 286.03);
--chart-3: oklch(0.67 0.118 329.149);
--chart-4: oklch(0.641 0.093 286.528);
--chart-5: oklch(0.638 0.116 309.445);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.132 0.026 311.003);
--foreground: oklch(1 0 180);
--muted: oklch(0.167 0.017 287.455);
--muted-foreground: oklch(0.781 0 180);
--popover: oklch(0.132 0.026 311.003);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.132 0.026 311.003);
--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.641 0.107 309.597);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.61 0.101 286.03);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.67 0.118 329.149);
--accent-foreground: oklch(0.088 0.012 328.375);
--destructive: oklch(0.627 0.211 28.009);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.641 0.107 309.597);
--chart-1: oklch(0.641 0.107 309.597);
--chart-2: oklch(0.61 0.101 286.03);
--chart-3: oklch(0.67 0.118 329.149);
--chart-4: oklch(0.641 0.093 286.528);
--chart-5: oklch(0.638 0.116 309.445);
}