Phaser API Documentation

  Version: 
<static> getTintFromFloats(r, g, b, a)

Description:

Packs four floats on a range from 0.0 to 1.0 into a single Uint32

Parameters:

name type description
r number

Red component in a range from 0.0 to 1.0

g number

Green component in a range from 0.0 to 1.0

b number

Blue component in a range from 0.0 to 1.0

a number

Alpha component in a range from 0.0 to 1.0

Returns:
Description:

The packed RGBA values as a Uint32.

Type:
  • number
Since: 3.0.0