Packagecom.cyntaxic.cyntils
Classpublic class CynColor
InheritanceCynColor Inheritance Object

The CynColor class contains static functions for manipulation of colors.



Public Methods
 MethodDefined By
  
hex2uint(hex:String):uint
[static] Converts a hexidecmal string into an unsigned integer.
CynColor
  
hsv2rgb(hue:Number, sat:Number, val:Number):Object
[static] Converts HSV values to RGB values.
CynColor
  
hsv2uint(hue:Number, sat:Number, val:Number):uint
[static] Converts HSV values to an unsigned integer.
CynColor
  
rgb2hsv(red:Number, grn:Number, blu:Number):Object
[static] Converts RGB values to HSV values.
CynColor
  
rgb2uint(r:int, g:int, b:int):uint
[static] Converts RGB values into an unsigned integer.
CynColor
  
uint2hex(num:uint):String
[static] Converts an unsigned integer into an hexidecmal string.
CynColor
Method Detail
hex2uint()method
public static function hex2uint(hex:String):uint

Converts a hexidecmal string into an unsigned integer. This does the opposite of uint2hex.

Parameters

hex:String — The hexidecmal string to convert.

Returns
uint — An unsigned integer with a equivalent value to the hex.

See also

hsv2rgb()method 
public static function hsv2rgb(hue:Number, sat:Number, val:Number):Object

Converts HSV values to RGB values. This does the opposite of rgb2hsv.

Parameters

hue:Number — The hue value.
 
sat:Number — The saturation value.
 
val:Number — The value. This also sometimes referred to as brightness.

Returns
Object — A result object containing the properties r for red, g for green and b for blue.

See also

hsv2uint()method 
public static function hsv2uint(hue:Number, sat:Number, val:Number):uint

Converts HSV values to an unsigned integer.

Parameters

hue:Number — The hue value.
 
sat:Number — The saturation value.
 
val:Number — The value. This also sometimes referred to as brightness.

Returns
uint — An unsigned integer with a equivalent value to the HSV values passed.
rgb2hsv()method 
public static function rgb2hsv(red:Number, grn:Number, blu:Number):Object

Converts RGB values to HSV values. This does the opposite of hsv2rgb.

Parameters

red:Number — The red value.
 
grn:Number — The green value.
 
blu:Number — The blue value.

Returns
Object — A result object containing the properties h for hue, s for saturation and v for value.

See also

rgb2uint()method 
public static function rgb2uint(r:int, g:int, b:int):uint

Converts RGB values into an unsigned integer.

Parameters

r:int — The red value as an integer.
 
g:int — The green value as an integer.
 
b:int — The blue value as an integer.

Returns
uint — An unsigned integer with a equivalent value to the RGB values passed.
uint2hex()method 
public static function uint2hex(num:uint):String

Converts an unsigned integer into an hexidecmal string. This does the opposite of hex2uint.

Parameters

num:uint — The unsigned integer to convert.

Returns
String — A hex string with a equivalent value to the uint.

See also