Context
In PR #413, chart datalabel colors in PrototypeLibraryPortfolio.tsx were changed from CSS variables to hardcoded hex values to work around Chart.js datalabels plugin not resolving hsl(var(...)) strings.
Problem
Hardcoded colors (#f3f4f6, #d1d5db, #374151) won't adapt to dark mode or custom themes.
File: frontend/src/components/organisms/PrototypeLibraryPortfolio.tsx (lines 220-230)
Current workaround
The hovered state already uses getCSSVariable('--primary') which works. Only the non-hovered states are hardcoded.
Suggested fix
Use getCSSVariable() for all color properties, same pattern as the hover state:
backgroundColor: (context) =>
context.dataIndex === hoveredIndex
? `hsl(${getCSSVariable('--primary')})`
: `hsl(${getCSSVariable('--muted')})`,
borderColor: `hsl(${getCSSVariable('--border')})`,
color: (context) =>
context.dataIndex === hoveredIndex
? '#ffffff'
: `hsl(${getCSSVariable('--muted-foreground')})`,
Context
In PR #413, chart datalabel colors in
PrototypeLibraryPortfolio.tsxwere changed from CSS variables to hardcoded hex values to work around Chart.js datalabels plugin not resolvinghsl(var(...))strings.Problem
Hardcoded colors (
#f3f4f6,#d1d5db,#374151) won't adapt to dark mode or custom themes.File:
frontend/src/components/organisms/PrototypeLibraryPortfolio.tsx(lines 220-230)Current workaround
The hovered state already uses
getCSSVariable('--primary')which works. Only the non-hovered states are hardcoded.Suggested fix
Use
getCSSVariable()for all color properties, same pattern as the hover state: