Class sandy.math.ColorMath

Description

Math functions for colors.

Method Index

hex2rgb(), hex2rgbn(), rgb2hex()

Method Detail

rgb2hex

static public function rgb2hex(r:Number, g:Number, b:Number):Number

Convert rgb to hexadecimal.

Parameters

rRed Color. Value between 0 and 255
gGreen Color. Value between 0 and 255
bBlue Color. Value between 0 and 255

Return

The hexadecimal color of the rvb given.

hex2rgb

static public function hex2rgb(hex:Number):Object

Convert hexadecimal to rvb object

Parameters

hexhexadecimal color.

Return

The rgb color of the hexadecimal given.

hex2rgbn

static public function hex2rgbn(hex:Number):Object

Convert hexadecimal to rvb object but normalized between (0 and 1.0)

Parameters

hexhexadecimal color.

Return

The rgb color of the hexadecimal given. (values normalized between 0 and 1.0 )