BitmapData#setHSL()

setHSL(h, s, l, region) → {Phaser.BitmapData}

Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

Parameters
Name Type Argument Default Description
h number <optional>
null

The hue, in the range 0 - 1.

s number <optional>
null

The saturation, in the range 0 - 1.

l number <optional>
null

The lightness, in the range 0 - 1.

region Phaser.Rectangle <optional>

The area to perform the operation on. If not given it will run over the whole BitmapData.

Returns

This BitmapData object for method chaining.

Source code: gameobjects/BitmapData.js (Line 804)
doc_phaser
2017-02-14 10:37:13
Comments
Leave a Comment

Please login to continue.