Design system · UI
DS0002Use design-system color tokens
Prefer theme colors over raw color values.
vite-doctor/design-systemuiwarnSuggestion
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 theme token that preserves the color and opacity at the use site. Use currentColor with a theme color class only for a monochrome SVG; otherwise use a matching theme variable for each paint.
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 design-system/strict --rules design-system/no-raw-colors