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,
float alpha = 1.0f) noexcept;
55 Color(
float red,
float green,
float blue,
float alpha = 1.0f) noexcept;
77 static
Color fromHSL(
float hue,
float saturation,
float lightness,
float alpha = 1.0f);
94 bool isNotEqual(const
Color& color,
bool withAlpha = true) noexcept;
95 bool operator==(const
Color& color) noexcept;
96 bool operator!=(const
Color& color) noexcept;
112 Color(const NVGcolor&) noexcept;
113 operator NVGcolor() const noexcept;
bool isEqual(const Color &color, bool withAlpha=true) noexcept
Color withAlpha(float alpha) const noexcept
static Color fromHSL(float hue, float saturation, float lightness, float alpha=1.0f)
void interpolate(const Color &other, float u) noexcept
void setFor(const GraphicsContext &context, bool includeAlpha=false)
void fixBounds() noexcept
static Color fromHTML(const char *rgb, float alpha=1.0f) noexcept