Color.toABGR()

<static> toABGR(r, g, b, a) → {number} Converts RGBA components to a 32 bit integer in AABBGGRR format. Parameters Name Type Description r number The red color component, in the range 0 - 255. g number The green color component, in the range 0 - 255. b number The blue color component, in the range 0 - 255. a number The alpha color component, in the range 0 - 255. Returns number - A RGBA-packed 32 bit integer Source code: utils/Color.js (Line 144)

Color.RGBtoString()

<static> RGBtoString(r, g, b, a, prefix) → {string} Converts the given color values into a string.If prefix was '#' it will be in the format #RRGGBB otherwise 0xAARRGGBB. Parameters Name Type Argument Default Description r number The red color component, in the range 0 - 255. g number The green color component, in the range 0 - 255. b number The blue color component, in the range 0 - 255. a number <optional> 255 The alpha color component, in the range 0 -

Color.RGBtoHSV()

<static> RGBtoHSV(r, g, b, out) → {object} Converts an RGB color value to HSV (hue, saturation and value).Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].Based on code by Michael Jackson (https://github.com/mjijackson) Parameters Name Type Argument Description r number The red color component, in the range 0 - 255. g number The green color component, in the range

Color.RGBtoHSL()

<static> RGBtoHSL(r, g, b, out) → {object} Converts an RGB color value to HSL (hue, saturation and lightness).Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1].Based on code by Michael Jackson (https://github.com/mjijackson) Parameters Name Type Argument Description r number The red color component, in the range 0 - 255. g number The green color component, in the ra

Color.packPixel()

<static> packPixel(r, g, b, a) → {number} Packs the r, g, b, a components into a single integer, for use with Int32Array.If device is little endian then ABGR order is used. Otherwise RGBA order is used. Parameters Name Type Description r number The red color component, in the range 0 - 255. g number The green color component, in the range 0 - 255. b number The blue color component, in the range 0 - 255. a number The alpha color component, in the range 0 - 255. Returns numb

Color.interpolateRGB()

<static> interpolateRGB(r1, g1, b1, r2, g2, b2, steps, currentStep) → {number} Interpolates the two given colours based on the supplied step and currentStep properties. Parameters Name Type Description r1 number The red color value, between 0 and 0xFF (255). g1 number The green color value, between 0 and 0xFF (255). b1 number The blue color value, between 0 and 0xFF (255). r2 number The red color value, between 0 and 0xFF (255). g2 number The green color value, between 0 and

Color.interpolateColorWithRGB()

<static> interpolateColorWithRGB(color, r, g, b, steps, currentStep) → {number} Interpolates the two given colours based on the supplied step and currentStep properties. Parameters Name Type Description color number The first color value. r number The red color value, between 0 and 0xFF (255). g number The green color value, between 0 and 0xFF (255). b number The blue color value, between 0 and 0xFF (255). steps number The number of steps to run the interpolation over. curre

Color.interpolateColor()

<static> interpolateColor(color1, color2, steps, currentStep, alpha) → {number} Interpolates the two given colours based on the supplied step and currentStep properties. Parameters Name Type Description color1 number The first color value. color2 number The second color value. steps number The number of steps to run the interpolation over. currentStep number The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the

Color.hueToColor()

<static> hueToColor(p, q, t) → {number} Converts a hue to an RGB color.Based on code by Michael Jackson (https://github.com/mjijackson) Parameters Name Type Description p number q number t number Returns number - The color component value. Source code: utils/Color.js (Line 396)

Color.HSVtoRGB()

<static> HSVtoRGB(h, s, v, out) → {object} Converts an HSV (hue, saturation and value) color value to RGB.Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255].Based on code by Michael Jackson (https://github.com/mjijackson) Parameters Name Type Argument Description h number The hue, in the range 0 - 1. s number The saturation, in the range 0 - 1. v number Th