Template Class color

Class Documentation

template<class T = std::uint8_t>
class util::color

Public Functions

color(T red, T green, T blue)
color(T red, T green, T blue, T alpha)
color(T red, T green, T blue, float alpha)
color(float red, float green, float blue)
color(float red, float green, float blue, T alpha)
color(float red, float green, float blue, float alpha)
~color() = default
color(const color&) = default
color(color&&) = default
auto operator=(const color&) noexcept -> color& = default
auto operator=(color&&) noexcept -> color& = default
auto get_red() const noexcept -> T
auto get_green() const noexcept -> T
auto get_blue() const noexcept -> T
auto get_alpha() const noexcept -> T
auto get_red_as_float() const noexcept -> float
auto get_green_as_float() const noexcept -> float
auto get_blue_as_float() const noexcept -> float
auto get_alpha_as_float() const noexcept -> float

Public Static Functions

static auto from_rgb(T red, T green, T blue) -> color
static auto from_rgba(T red, T green, T blue, T alpha) -> color
static auto from_rgba(T red, T green, T blue, float alpha) -> color
static auto from_rgb(float red, float green, float blue) -> color
static auto from_rgba(float red, float green, float blue, T alpha) -> color
static auto from_rgba(float red, float green, float blue, float alpha) -> color