Class Index | File Index

Classes


Class color

color
Defined in: color.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
color()
Holds a standard RGBA value.
Field Summary
Field Attributes Field Name and Description
 
a
Alpha/opacity component.
 
Alias for color.a
 
b
Blue component.
 
Alias for color.b
 
g
Green component.
 
Alias for color.g
 
r
Red component.
 
red
Alias for color.r
Method Summary
Method Attributes Method Name and Description
 
Creates a copy of this color.
 
set(value)
Sets the color from a string value or color.
 
Converts the color into a string.
Class Detail
color()
Holds a standard RGBA value. See sandboxe.color.create to instantiate it.

colors are sandboxe's primitive color type. Each component holds byte values but are expressed as decimals from 0.0 (no intensity) to 1.0 (maximum intensity). A notable feature is that components or arguments that except colors may also accept string values as if calling color.set.
Field Detail
a
Alpha/opacity component. Defined from 0.0 to 1.0

alpha
Alias for color.a

b
Blue component. Defined from 0.0 to 1.0

blue
Alias for color.b

g
Green component. Defined from 0.0 to 1.0

green
Alias for color.g

r
Red component. Defined from 0.0 to 1.0

red
Alias for color.r
Method Detail
{color} clone()
Creates a copy of this color.
Returns:
{color}

set(value)
Sets the color from a string value or color. String values accepted can follow one of 2 formats:

1.) As a color name (see this list https://en.wikipedia.org/wiki/X11_color_names)
2.) As a typical hex html / css style format color (i.e. #ff00ff). Alpha channel may be included in this hex string.
Parameters:
{String|color} value
The new value to set.

{String} toString()
Converts the color into a string.
Returns:
{String}

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 03 2019 18:30:56 GMT-0500 (EST)