shadcn · UI
SHAD0002Use design-system color tokens
Prefer theme colors over raw color values.
vite-doctor/shadcnuiwarnSuggestion
Why it happens
Raw palette colors and literal SVG colors bypass the project's theme. Checking undeclared color tokens and suggesting theme replacements requires a readable theme; without one, those checks are unavailable.
Fix
Use a color token declared by the theme. For SVG, use currentColor with a theme color class or reference a theme variable.
Example
Inherit the SVG color without theme lookup
Before
<svg><path fill="#ec4899" d="M0 0h10v10H0z" /></svg>
After
<svg><path fill="currentColor" d="M0 0h10v10H0z" /></svg>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --extends shadcn/strict --rules shadcn/no-raw-colors