Obedient is a shadcn/ui theme built around a vivid violet primary color (#4017b0) with muted light violet accents (#bdb7cd). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the vivid violet primary (#4017b0) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #000000black |
| Foreground | #020105black | #fcfcfdwhite |
| Card | #fcfbfewhite | #000000black |
| Card foreground | #020105black | #fcfcfdwhite |
| Popover | #fcfbfewhite | #000000black |
| Popover foreground | #020105black | #fcfcfdwhite |
| Primary | #4017b0rebeccapurple | #4017b0rebeccapurple |
| Primary foreground | #fcfafeghostwhite | #fcfafeghostwhite |
| Secondary | #d2d0d8lightgrey | #1e1e20black |
| Secondary foreground | #383540darkslategray | #b7b5basilver |
| Muted | #efeef1whitesmoke | #0f0e11black |
| Muted foreground | #45424cdarkslategray | #b5b3bdsilver |
| Accent | #bdb7cdsilver | #35313fdarkslategray |
| Accent foreground | #252130darkslategray | #cecbd7lightgrey |
| Destructive | #9d1001darkred | #fe4834tomato |
| Destructive foreground | #ffd6d1bisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4017b0rebeccapurple | #4017b0rebeccapurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.20:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 10.30:1 | AAA |
| Secondary button | 7.83:1 | AAA |
| Muted text | 8.52:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 6.27:1 | AA |
| Text on background | 20.48:1 | AAA |
| Text on card | 20.48:1 | AAA |
| Primary button | 10.30:1 | AAA |
| Secondary button | 8.20:1 | AAA |
| Muted text | 9.30:1 | AAA |
| Accent | 7.92:1 | AAA |
| Destructive | 3.38:1 | AA Large |
Paste this into your globals.css to use Obedient in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 298.508);
--foreground: oklch(0.072 0.024 298.331);
--muted: oklch(0.951 0.004 298.498);
--muted-foreground: oklch(0.387 0.017 297.793);
--popover: oklch(0.99 0.003 298.508);
--popover-foreground: oklch(0.072 0.024 298.331);
--card: oklch(0.99 0.003 298.508);
--card-foreground: oklch(0.072 0.024 298.331);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.39 0.213 282.384);
--primary-foreground: oklch(0.988 0.005 298.473);
--secondary: oklch(0.861 0.011 298.346);
--secondary-foreground: oklch(0.337 0.019 297.594);
--accent: oklch(0.79 0.031 297.869);
--accent-foreground: oklch(0.261 0.028 296.669);
--destructive: oklch(0.444 0.174 30.707);
--destructive-foreground: oklch(0.909 0.046 25.488);
--ring: oklch(0.39 0.213 282.384);
--chart-1: oklch(0.39 0.213 282.384);
--chart-2: oklch(0.861 0.011 298.346);
--chart-3: oklch(0.79 0.031 297.869);
--chart-4: oklch(0.886 0.009 298.391);
--chart-5: oklch(0.39 0.218 281.465);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.991 0.002 298.531);
--muted: oklch(0.166 0.006 297.952);
--muted-foreground: oklch(0.771 0.014 298.241);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.991 0.002 298.531);
--card: oklch(0 0 0);
--card-foreground: oklch(0.991 0.002 298.531);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.39 0.213 282.384);
--primary-foreground: oklch(0.988 0.005 298.473);
--secondary: oklch(0.235 0.004 298.303);
--secondary-foreground: oklch(0.777 0.006 298.429);
--accent: oklch(0.323 0.026 297.134);
--accent-foreground: oklch(0.849 0.017 298.222);
--destructive: oklch(0.664 0.221 30.185);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.39 0.213 282.384);
--chart-1: oklch(0.39 0.213 282.384);
--chart-2: oklch(0.235 0.004 298.303);
--chart-3: oklch(0.323 0.026 297.134);
--chart-4: oklch(0.266 0.004 298.285);
--chart-5: oklch(0.39 0.218 281.465);
}