Packagecom.zavoo.svg.data
Classpublic class SVGColors



Public Properties
 PropertyDefined by
  colors : Object
[static] Object of colors by name
SVGColors
Public Methods
 MethodDefined by
  
cleanNumber(num:*):Number
[static] Remove the numeric value of string will all characters removed except '0-9', '.', and '-'
SVGColors
  
d2h(d:int):String
[static] Convert a decimal number to hex
SVGColors
  
getColor(color:String):Number
[static] Get the number value of a color string
SVGColors
  
getHexColor(color:String):String
[static] Get a hex string of a color string
SVGColors
  
numberToRgb(num:Number):Object
[static] Convert a color number to red, green and blue values
SVGColors
  
rgbToNumber(r:uint, g:uint, b:uint):Number
[static]
SVGColors
Property detail
colorsproperty
public static var colors:Object

Object of colors by name

Method detail
cleanNumber()method
public static function cleanNumber(num:*):Number

Remove the numeric value of string will all characters removed except '0-9', '.', and '-'

Parameters
num:* — to be cleaned

Returns
Number — Numeric value of string will all characters removed except '0-9', '.', and '-'
d2h()method 
public static function d2h(d:int):String

Convert a decimal number to hex

Parameters
d:int

Returns
String
getColor()method 
public static function getColor(color:String):Number

Get the number value of a color string

Parameters
color:String — String value of a color ('black', '#ff0000', etc...)

Returns
Number — Numeric value of color
getHexColor()method 
public static function getHexColor(color:String):String

Get a hex string of a color string

Parameters
color:String — String value of a color ('black', '#ff0000', etc...)

Returns
String — Hex value of color
numberToRgb()method 
public static function numberToRgb(num:Number):Object

Convert a color number to red, green and blue values

Parameters
num:Number

Returns
Object
rgbToNumber()method 
public static function rgbToNumber(r:uint, g:uint, b:uint):NumberParameters
r:uint
 
g:uint
 
b:uint

Returns
Number