colorHexToG function

Syntax

  • float colorHexToG(hexValue)

Parameters

  1. hexValue—string
    Hexadecimal color string in the format "#rrggbb" or "#rrggbboo".

Returns

Returns G value in [0,1] after converting hexadecimal color to RGB.

Description

The colorHexToG function converts a hexadecimal color string to RGB and returns the G value.

Related

Examples

colorHexToG("#4080BF")
# result = 0.5019607843137256
colorHexToG("#4080BF80")
# result = 0.5019607843137256