Skip to main content

Function: colorToRgba()

colorToRgba(color, alpha): Rgba

Defined in: src/utils/color.ts:105

Convert a color to an [r, g, b, a] float array (0.0..1.0).

Ports color_to_rgba: the supplied alpha replaces any alpha carried by the color itself.

Parameters​

color​

string

alpha​

number = 1.0

Returns​

Rgba