MCPcopy Index your code
hub / github.com/phaserjs/phaser / IntegerToColor

Function IntegerToColor

src/display/color/IntegerToColor.js:21–28  ·  view source on GitHub ↗
(input, color)

Source from the content-addressed store, hash-verified

19 * @return {Phaser.Display.Color} A Color object containing the red, green, blue, and alpha components extracted from the given integer.
20 */
21var IntegerToColor = function (input, color)
22{
23 var rgb = IntegerToRGB(input);
24
25 if (!color) { return new Color(rgb.r, rgb.g, rgb.b, rgb.a); }
26
27 return color.setTo(rgb.r, rgb.g, rgb.b, rgb.a);
28};
29
30module.exports = IntegerToColor;

Callers 4

ValueToColorFunction · 0.85
TextureManager.jsFile · 0.85
PointLight.jsFile · 0.85

Calls 1

IntegerToRGBFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…