Luna::Color::to_rgba8

constexpr u32 to_rgba8(const Float4 &color)

Converts one Float4 linear color value to one 32-bit color value. Every color component takes 8 bits, and is arranged in RGBA order (R in least significant 8 bits, A in most significant 8 bits).

Parameters

  • in color

    The color to convert.

Return value

Returns the converted color.