HexToHSV
Color
stable
Convert a hexadecimal colour string to HSV. Delegates to HexToRGB then RGBtoHSV. Useful when feeding a user-picked hex value into the colour-picker engine.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- hexrequiredTHex
- Hexadecimal colour string with or without a leading "#". Accepts 3-, 4-, 6- and 8-character forms.
API
Return value
The value returned by this util.
- Equivalent colour in HSV space. h in [0, 360], s and v in [0, 1], a in [0, 1] when an alpha channel was present.
Usage
Examples
Ready-to-paste usage snippets.
Hex red to HSV