@arolariu/components / hexToHsl
Variable: hexToHsl()
consthexToHsl: (hexColor) =>string=convertHexToHslString
Defined in: lib/color-conversion-utilities.ts:155
Converts a hexadecimal color code to an HSL string for CSS variables. The output format matches Tailwind CSS HSL variable format: "h s% l%"
Parameters
hexColor
string
Hex color code (e.g., "#06b6d4" or "06b6d4")
Returns
string
HSL values as "h s% l%" string suitable for CSS variables
Example
convertHexToHslString("#06b6d4"); // "187 94% 43%"
convertHexToHslString("#ec4899"); // "330 81% 60%"
Deprecated
Use convertHexToHslString instead