Color.getColor32()

<static> getColor32(a, r, g, b) → {number} Given an alpha and 3 color values this will return an integer representation of it. Parameters Name Type Description a number The alpha color component, in the range 0 - 255. 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. Returns number - A native color value integer (format: 0xAARRGGBB). Source code: uti

Color.getColor()

<static> getColor(r, g, b) → {number} Given 3 color values this will return an integer representation of it. 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. Returns number - A native color value integer (format: 0xRRGGBB). Source code: utils/Color.js (Line 500)

Color.getBlue()

<static> getBlue(color) → {number} Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255. Parameters Name Type Description color number In the format 0xAARRGGBB. Returns number - The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue). Source code: utils/Color.js (Line 978)

Color.getAlphaFloat()

<static> getAlphaFloat(color) → {number} Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1. Parameters Name Type Description color number In the format 0xAARRGGBB. Returns number - The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). Source code: utils/Color.js (Line 942)

Color.getAlpha()

<static> getAlpha(color) → {number} Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255. Parameters Name Type Description color number In the format 0xAARRGGBB. Returns number - The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). Source code: utils/Color.js (Line 930)

Color.fromRGBA()

<static> fromRGBA(rgba, out) → {object} A utility to convert an integer in 0xRRGGBBAA format to a color object.This does not rely on endianness. Parameters Name Type Argument Description rgba number An RGBA hex out object <optional> The object to use, optional. Returns object - A color object. Author: Matt DesLauriers (@mattdesl) Source code: utils/Color.js (Line 97)

Color.createColor()

<static> createColor(r, g, b, a, h, s, l, v) → {object} A utility function to create a lightweight 'color' object with the default components.Any components that are not specified will default to zero. This is useful when you want to use a shared color object for the getPixel and getPixelAt methods. Parameters Name Type Argument Default Description r number <optional> 0 The red color component, in the range 0 - 255. g number <optional> 0 The green color component

Color.componentToHex()

<static> componentToHex(color) → {string} Return a string containing a hex representation of the given color component. Parameters Name Type Description color number The color channel to get the hex value for, must be a value between 0 and 255. Returns string - A string of length 2 characters, i.e. 255 = ff, 100 = 64. Source code: utils/Color.js (Line 694)

Color.blendVividLight()

<static> blendVividLight(a, b) → {integer} This blend mode combines Color Dodge and Color Burn (rescaled so that neutral colors become middle gray).Dodge applies when values in the top layer are lighter than middle gray, and burn to darker values.The middle gray is the neutral color. When color is lighter than this, this effectively moves the white point of the bottomlayer down by twice the difference; when it is darker, the black point is moved up by twice the difference. The perceive

Color.blendSubtract()

<static> blendSubtract(a, b) → {integer} Combines the source and backdrop colors and returns their value minus 255. Parameters Name Type Description a integer The source color to blend, in the range 1 to 255. b integer The backdrop color to blend, in the range 1 to 255. Returns integer - The blended color value, in the range 1 to 255. Source code: utils/Color.js (Line 1071)