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

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

hex
requis
THex
Hexadecimal colour string with or without a leading "#". Accepts 3-, 4-, 6- and 8-character forms.

API

Valeur de retour

La valeur retournée par cet 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

Exemples

Extraits de code prêts à coller.

Hex red to HSV

typescript