17 #ifndef DGL_COLOR_HPP_INCLUDED
18 #define DGL_COLOR_HPP_INCLUDED
37 struct {
float red, green, blue, alpha; };
49 Color(
int red,
int green,
int blue,
int alpha = 255) noexcept;
55 Color(
float red,
float green,
float blue,
float alpha = 1.0f) noexcept;
72 static Color fromHSL(
float hue,
float saturation,
float lightness,
float alpha = 1.0f);
88 bool isEqual(
const Color& color,
bool withAlpha =
true) noexcept;
89 bool isNotEqual(
const Color& color,
bool withAlpha =
true) noexcept;
90 bool operator==(
const Color& color) noexcept;
91 bool operator!=(
const Color& color) noexcept;
102 Color(
const NVGcolor&) noexcept;
103 operator NVGcolor()
const noexcept;
110 #endif // DGL_COLOR_HPP_INCLUDED
void fixBounds() noexcept
static Color fromHSL(float hue, float saturation, float lightness, float alpha=1.0f)
bool isEqual(const Color &color, bool withAlpha=true) noexcept
void interpolate(const Color &other, float u) noexcept
static Color fromHTML(const char *rgb, float alpha=1.0f)