Files
mtdb_movie/common/resources/client/ui/themes/utils/theme-value-to-hex.ts
T
maher 511fad8199
Build / run (push) Has been cancelled
Initial commit
2026-05-14 13:42:10 +02:00

10 lines
232 B
TypeScript
Executable File

import {parseColor} from '@react-stately/color';
export function themeValueToHex(value: string): string {
try {
return parseColor(`rgb(${value.split(' ').join(',')})`).toString('hex');
} catch (e) {
return value;
}
}