feat: ensure all category components use consistent hex colors

Update all category-related UI components to use getCategoryColorHex() function
instead of CSS variables for consistent color application across the app.

Changes:
- MainConverter: category buttons now use hex colors for background/border
- MainConverter: quick result display uses hex color for text and border
- MainConverter: result cards use hex color for left border
- CommandPalette: measure commands use hex colors for color indicators
- SearchUnits: category color dots use hex colors

This ensures all category colors are consistently applied using the same
hex color values defined in the OKLCH color palette.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-08 10:36:26 +01:00
parent 1943974908
commit eb556ddfce
3 changed files with 15 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ import {
getUnitInfo,
formatMeasureName,
getCategoryColor,
getCategoryColorHex,
type Measure,
type UnitInfo,
} from '@/lib/units';
@@ -182,7 +183,7 @@ export default function SearchUnits({ onSelectUnit }: SearchUnitsProps) {
<div
className="w-3 h-3 rounded-full flex-shrink-0"
style={{
backgroundColor: `var(--color-${getCategoryColor(result.measure)})`,
backgroundColor: getCategoryColorHex(result.measure),
}}
/>
</button>