toRgba

fnRgba toRgba(uint rgba) @trusted @safe nothrow @nogc

Converts a packed 32-bit RGBA integer to an Rgba color.

fnRgba toRgba(Vec3 vec) @trusted @safe nothrow @nogc

Converts a Vec3 to an Rgba color, clamping each component to the range [0, 255] with full opacity.

fnRgba toRgba(Vec4 vec) @trusted @safe nothrow @nogc

Converts a Vec4 to an Rgba color, clamping each component to the range [0, 255].

fnRgba toRgba(IStr str) @trusted @safe nothrow @nogc

Converts a hex color string (e.g. "#RGB", "RRGGBB", "RRGGBBAA") to an Rgba color. Returns blank if the string is invalid.