colorHexToO
Syntax
float colorHexToO(hexValue)
Parameters
- hexValue (string)
Hexadecimal color string in the format "#rrggbboo"
Returns
Returns O value in [0,1] from hexadecimal color string in the format "#rrggbboo" where "oo" are the opacity values
Description
This function extracts the opacity value from a hexadecimal color string and converts it to a value in [0,1]. Returns 0 if hexadecimal string is too short.
Related
- colorHexToH function
- colorHexToS function
- colorHexToV function
- colorHexToR function
- colorHexToG function
- colorHexToB function
- colorHSVToHex function
- colorHSVOToHex function
- colorRGBToHex function
- colorRGBOToHex function
Examples
colorHexToO("#4080BF80") # result = 0.5019607843137256 colorHexToO("#4080BF") # result = 0
Copyright ©2008-2024 Esri R&D Center Zurich. All rights reserved.