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

Function ObjectToColor

src/display/color/ObjectToColor.js:20–25  ·  view source on GitHub ↗
(input, color)

Source from the content-addressed store, hash-verified

18 * @return {Phaser.Display.Color} A Color object.
19 */
20var ObjectToColor = function (input, color)
21{
22 if (!color) { return new Color(input.r, input.g, input.b, input.a); }
23
24 return color.setTo(input.r, input.g, input.b, input.a);
25};
26
27module.exports = ObjectToColor;

Callers 2

ValueToColorFunction · 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…