(input, color)
| 19 | * @return {Phaser.Display.Color} A Color object containing the red, green, blue, and alpha components extracted from the given integer. |
| 20 | */ |
| 21 | var 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 | |
| 30 | module.exports = IntegerToColor; |
no test coverage detected
searching dependent graphs…