···1+import { convertCSSToHex, hex_to_okhsv } from '@foxui/colors';
2+3+export function getCSSVar(variable: string) {
4+ return getComputedStyle(document.body).getPropertyValue(variable).trim();
5+}
6+7+/**
8+ * Converts a CSS color string to a hue value in the 0-1 range
9+ */
10+export function colorToHue(color: string): number {
11+ const hex = convertCSSToHex(color);
12+ const okhsv = hex_to_okhsv(hex);
13+ return okhsv.h;
14+}