ezgl
1.0.1
An Easy Graphics & GUI Library
|
Represents a color as a mixture or red, green, and blue as well as the transparency level. More...
#include <color.hpp>
Public Member Functions | |
constexpr | color () noexcept |
Default constructor: Create a black color. | |
constexpr | color (std::uint_fast8_t r, std::uint_fast8_t g, std::uint_fast8_t b, std::uint_fast8_t a=255) noexcept |
Create a color. More... | |
bool | operator== (const color &rhs) const |
Test for equality. | |
bool | operator!= (const color &rhs) const |
Test for inequality. | |
Public Attributes | |
std::uint_fast8_t | red |
A red component of the color, between 0 and 255. | |
std::uint_fast8_t | green |
The green component of the color, between 0 and 255. | |
std::uint_fast8_t | blue |
The blue component of the color, between 0 and 255. | |
std::uint_fast8_t | alpha |
The amount of transparency, between 0 and 255. | |
Represents a color as a mixture or red, green, and blue as well as the transparency level.
Each color channel and transparency level is an 8-bit value, ranging from 0-255.
|
inlineconstexprnoexcept |
Create a color.
r | The amount of red. |
g | The amount of green. |
b | The amount of blue. |
a | The level of transparency. |