Skip to content

Commit 3cfe200

Browse files
committed
Minor documentation cleanup
1 parent 37a77c6 commit 3cfe200

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/core/Stage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@ Phaser.Stage.prototype.visibilityChange = function (event) {
286286
};
287287

288288
/**
289-
* Sets the background color for the Stage. The color can be given as a hex value (#RRGGBB) or a numeric value (0xRRGGBB)
289+
* Sets the background color for the Stage.
290+
*
291+
* The color can be given as a hex string (`'#RRGGBB'`), a CSS color string (`'rgb(r,g,b)'`), or a numeric value (`0xRRGGBB`).
292+
*
293+
* An alpha channel is _not_ supported and will be ignored.
290294
*
291295
* @name Phaser.Stage#setBackgroundColor
292296
* @param {number|string} backgroundColor - The color of the background.

src/utils/Color.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,15 +622,17 @@ Phaser.Color = {
622622
},
623623

624624
/**
625-
* Converts a string - either in "hex" or a "CSS 'web' string" into a Phaser Color object.
625+
* Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.
626+
*
627+
* The value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).
626628
*
627629
* An alpha channel is _not_ supported when specifying a hex string.
628630
*
629631
* @method Phaser.Color.valueToColor
630632
* @static
631-
* @param {string|number} value - Can either be a string (see `hexToColor` and `webToColor` for the supported formats) or a number (see `getRGB`).
632-
* @param {object} [out] - An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created.
633-
* @return {object} An object with the red, green, blue and alpha values set in the r, g, b and a properties.
633+
* @param {string|number} value - The color expressed as a recognized string format or a packed integer.
634+
* @param {object} [out] - The object to use for the output. If not provided a new object will be created.
635+
* @return {object} The (`out`) object with the red, green, blue, and alpha values set as the r/g/b/a properties.
634636
*/
635637
valueToColor: function (value, out) {
636638

0 commit comments

Comments
 (0)