Class Index | File Index | UML

Classes


Namespace one.color


UML
one.color
Defined in: color.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<private> <static>  
one.color.rgbaRegex
Regex for matching CSS RGBA color strings
Method Summary
Method Attributes Method Name and Description
<private> <static>  
one.color.fromCSSRGBA(strCSS)
Parse a CSS RGBA string.
<private> <static>  
one.color.fromHex(strHex)
Parse a hex string.
<static>  
one.color.installColorSpace(colorSpaceName, propertyDefinitions, config)
<static>  
one.color.parse(obj)
Parse a hex string, 24-bit integer or object representing a color.
Namespace Detail
one.color
Field Detail
<private> <static> one.color.rgbaRegex
Regex for matching CSS RGBA color strings
Defined in: color-parse.js.
Method Detail
<private> <static> {one.color.RGB} one.color.fromCSSRGBA(strCSS)
Parse a CSS RGBA string. Please use one.color#parse instead.
Defined in: color-parse.js.
Parameters:
strCSS
The CSS RGBA string, e.g. "rgb(100, 255, 100)", "rgba(0, 0, 255, 0.5)", "rgb(0%, 100%, 0%)"....
Returns:
{one.color.RGB} Color object representing the parsed color, or false if the string couldn't be parsed.

<private> <static> {one.color.RGB} one.color.fromHex(strHex)
Parse a hex string. Please use one.color#parse instead.
Defined in: color-parse.js.
Parameters:
strHex
The hex string, e.g. "#abc", "123abc"....
Returns:
{one.color.RGB} Color object representing the parsed color, or false if the string couldn't be parsed.

<static> one.color.installColorSpace(colorSpaceName, propertyDefinitions, config)
Parameters:
colorSpaceName
propertyDefinitions
config

<static> {one.color.RGB|one.color.HSL|one.color.HSV|one.color.CMYK} one.color.parse(obj)
Parse a hex string, 24-bit integer or object representing a color. If a one.color.(RGB|HSL|HSV|CMYK) object is provided, it will be returned as-is, so in library code you can use one.color.parse to be flexible about how colors are provided to you:

function foo (color) {
color = color.parse(color);
// Now we are sure that color is a one.color.(RGB|CMYK|HSL|HSV) object, even if it was provided as a hex string.
}

Defined in: color-parse.js.
Parameters:
{String|Object} obj
A hex string, integer value, or object to parse.
Returns:
{one.color.RGB|one.color.HSL|one.color.HSV|one.color.CMYK} Color object representing the parsed color, or false if the input couldn't be parsed.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Oct 17 2011 19:23:47 GMT+0200 (CEST)