refactor: remove category colors from units app

This commit is contained in:
2026-02-25 18:24:15 +01:00
parent f28a2d1eab
commit 317a80dbad
5 changed files with 5 additions and 126 deletions

View File

@@ -167,74 +167,6 @@ export function convertToAll(
}
}
/**
* Get category color for a measure (Tailwind class name)
*/
export function getCategoryColor(measure: Measure): string {
const colorMap: Record<Measure, string> = {
angle: 'category-angle',
apparentPower: 'category-apparent-power',
area: 'category-area',
current: 'category-current',
digital: 'category-digital',
each: 'category-each',
energy: 'category-energy',
frequency: 'category-frequency',
illuminance: 'category-illuminance',
length: 'category-length',
mass: 'category-mass',
pace: 'category-pace',
partsPer: 'category-parts-per',
power: 'category-power',
pressure: 'category-pressure',
reactiveEnergy: 'category-reactive-energy',
reactivePower: 'category-reactive-power',
speed: 'category-speed',
temperature: 'category-temperature',
tempo: 'category-tempo',
time: 'category-time',
voltage: 'category-voltage',
volume: 'category-volume',
volumeFlowRate: 'category-volume-flow-rate',
};
return colorMap[measure];
}
/**
* Get category color hex value for a measure
*/
export function getCategoryColorHex(measure: Measure): string {
const colorMap: Record<Measure, string> = {
angle: '#f43f5e', // Rose 500
apparentPower: '#8b5cf6', // Violet 500
area: '#10b981', // Emerald 500
current: '#f59e0b', // Amber 500
digital: '#3b82f6', // Blue 500
each: '#64748b', // Slate 500
energy: '#f59e0b', // Amber 500
frequency: '#8b5cf6', // Violet 500
illuminance: '#eab308', // Yellow 500
length: '#3b82f6', // Blue 500
mass: '#10b981', // Emerald 500
pace: '#14b8a6', // Teal 500
partsPer: '#94a3b8', // Slate 400
power: '#8b5cf6', // Violet 500
pressure: '#6366f1', // Indigo 500
reactiveEnergy: '#f59e0b', // Amber 500
reactivePower: '#8b5cf6', // Violet 500
speed: '#14b8a6', // Teal 500
temperature: '#ef4444', // Red 500
tempo: '#f97316', // Orange 500
time: '#6366f1', // Indigo 500
voltage: '#f59e0b', // Amber 500
volume: '#10b981', // Emerald 500
volumeFlowRate: '#10b981', // Emerald 500
};
return colorMap[measure];
}
/**
* Format measure name for display
*/