colorHexToG function

Syntax

  • string colorHexToG(hex)

Parameters

  1. hex—string
    Hex color string in the format "#rrggbb" or "#rrggbboo"

Returns

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

Description

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

Related

Examples

example.1
	colorHexToG("#4080BF")
	# result = 0.5019607843137256

example.2
	colorHexToG("#4080BF80")
	# result = 0.5019607843137256

In this topic