Phaser API Documentation

  Version: 
<static> RGBStringToColor(rgb)

Description:

Converts a CSS 'web' string into a Phaser Color object.

The web string can be in the format 'rgb(r,g,b)' or 'rgba(r,g,b,a)' where r/g/b are in the range [0..255] and a is in the range [0..1].

Parameters:

name type description
rgb string

The CSS format color string, using the rgb or rgba format.

Returns:
Description:

A Color object.

Since: 3.0.0