Class Index | File Index

Classes


Namespace CAAT.Module.ColorUtil.Color


Defined in: Color.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
CAAT.Module.ColorUtil.Color.RampEnumeration
Enumeration to define types of color ramps.
Method Summary
Method Attributes Method Name and Description
<static>  
CAAT.Module.ColorUtil.Color.hsvToRgb(h, s, v)
HSV to RGB color conversion

H runs from 0 to 360 degrees
S and V run from 0 to 100

Ported from the excellent java algorithm by Eugene Vishnevsky at: http://www.cs.rit.edu/~ncs/color/t_convert.html

<static>  
CAAT.Module.ColorUtil.Color.interpolate(r0, g0, b0, r1, g1, b1, nsteps, step)
Interpolate the color between two given colors.
<static>  
CAAT.Module.ColorUtil.Color.makeRGBColorRamp(fromColorsArray, rampSize, returnType)
Generate a ramp of colors from an array of given colors.
<static>  
CAAT.Module.ColorUtil.Color.random()
Namespace Detail
CAAT.Module.ColorUtil.Color
Field Detail
<static> CAAT.Module.ColorUtil.Color.RampEnumeration
Enumeration to define types of color ramps.
Method Detail
<static> CAAT.Module.ColorUtil.Color.hsvToRgb(h, s, v)
HSV to RGB color conversion

H runs from 0 to 360 degrees
S and V run from 0 to 100

Ported from the excellent java algorithm by Eugene Vishnevsky at: http://www.cs.rit.edu/~ncs/color/t_convert.html

Parameters:
h
s
v

<static> {{r{number}|g{number}|b{number}}} CAAT.Module.ColorUtil.Color.interpolate(r0, g0, b0, r1, g1, b1, nsteps, step)
Interpolate the color between two given colors. The return value will be a calculated color among the two given initial colors which corresponds to the 'step'th color of the 'nsteps' calculated colors.
Parameters:
r0
{number} initial color red component.
g0
{number} initial color green component.
b0
{number} initial color blue component.
r1
{number} final color red component.
g1
{number} final color green component.
b1
{number} final color blue component.
nsteps
{number} number of colors to calculate including the two given colors. If 16 is passed as value, 14 colors plus the two initial ones will be calculated.
step
{number} return this color index of all the calculated colors.
Returns:
{{r{number}|g{number}|b{number}}} return an object with the new calculated color components.

<static> {[{number}|{number}|{number}|{number}]} CAAT.Module.ColorUtil.Color.makeRGBColorRamp(fromColorsArray, rampSize, returnType)
Generate a ramp of colors from an array of given colors.
Parameters:
fromColorsArray
{[number]} an array of colors. each color is defined by an integer number from which color components will be extracted. Be aware of the alpha component since it will also be interpolated for new colors.
rampSize
{number} number of colors to produce.
returnType
{CAAT.ColorUtils.RampEnumeration} a value of CAAT.ColorUtils.RampEnumeration enumeration.
Returns:
{[{number}|{number}|{number}|{number}]} an array of integers each of which represents a color of the calculated color ramp.

<static> CAAT.Module.ColorUtil.Color.random()

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:19 GMT-0700 (PDT)