Template Struct RgbaColor

Struct Documentation

template<typename T>
struct RgbaColor

RgbaColor stores the red, green, blue and alpha components of a color with the precision of the template parameter T. For example if T is float, the values are normalized between 0 and 1. If T is uint8_t, they values range is 0 to 255.

Public Functions

RgbaColor(const Color &col)

Creates a new RgbaColor instance from a given color. This template function is specialized and thus implemented for T == uint8_t and T == float.

inline RgbaColor(const Color &color)

Constructs a new RgbaColor<uint8_t> from the color color.

inline RgbaColor(const Color &color)

Constructs a new RgbaColor<float> from the color color.

Public Members

T alpha

The alpha component.

T red

The red component.

T green

The green component.

T blue

The blue component.