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

Function IntegerToRGB

src/display/color/IntegerToRGB.js:20–41  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

18 * @return {Phaser.Types.Display.ColorObject} An object with the alpha, red, green, and blue values set in the a, r, g, and b properties.
19 */
20var IntegerToRGB = function (color)
21{
22 if (color > 16777215)
23 {
24 // The color value has an alpha component
25 return {
26 a: color >>> 24,
27 r: color >> 16 & 0xFF,
28 g: color >> 8 & 0xFF,
29 b: color & 0xFF
30 };
31 }
32 else
33 {
34 return {
35 a: 255,
36 r: color >> 16 & 0xFF,
37 g: color >> 8 & 0xFF,
38 b: color & 0xFF
39 };
40 }
41};
42
43module.exports = IntegerToRGB;

Callers 3

IntegerToColorFunction · 0.85
EmitterColorOp.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…