···11+import { convertCSSToHex, hex_to_okhsv } from '@foxui/colors';
22+33+export function getCSSVar(variable: string) {
44+ return getComputedStyle(document.body).getPropertyValue(variable).trim();
55+}
66+77+/**
88+ * Converts a CSS color string to a hue value in the 0-1 range
99+ */
1010+export function colorToHue(color: string): number {
1111+ const hex = convertCSSToHex(color);
1212+ const okhsv = hex_to_okhsv(hex);
1313+ return okhsv.h;
1414+}