Files
mtdb_movie/common/resources/client/ui/themes/utils/theme-value-to-hex.ts
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01: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;
}
}