|
DISTRHO Plugin Framework
|
#include <Color.hpp>
Public Member Functions | |
| Color () noexcept | |
| Color (int red, int green, int blue, int alpha=255) noexcept | |
| Color (float red, float green, float blue, float alpha=1.0f) noexcept | |
| Color (const Color &color) noexcept | |
| Color & | operator= (const Color &color) noexcept |
| Color (const Color &color1, const Color &color2, float u) noexcept | |
| void | interpolate (const Color &other, float u) noexcept |
| bool | isEqual (const Color &color, bool withAlpha=true) noexcept |
| bool | isNotEqual (const Color &color, bool withAlpha=true) noexcept |
| bool | operator== (const Color &color) noexcept |
| bool | operator!= (const Color &color) noexcept |
| void | fixBounds () noexcept |
| Color (const NVGcolor &) noexcept | |
| operator NVGcolor () const noexcept | |
Static Public Member Functions | |
| static Color | fromHSL (float hue, float saturation, float lightness, float alpha=1.0f) |
| static Color | fromHTML (const char *rgb, float alpha=1.0f) |
Public Attributes | |
| union { | |
| float rgba [4] | |
| struct { | |
| float red | |
| float green | |
| float blue | |
| float alpha | |
| } | |
| }; | |
A color made from red, green, blue and alpha floating-point values in [0..1] range.
|
noexcept |
Create solid black color.
|
noexcept |
Create a color from red, green, blue and alpha numeric values. Values must be in [0..255] range.
|
noexcept |
Create a color from red, green, blue and alpha floating-point values. Values must in [0..1] range.
|
noexcept |
Create a color by copying another color.
Create a color by linearly interpolating two other colors.
|
static |
Create a color specified by hue, saturation and lightness. Values must in [0..1] range.
|
static |
Create a color from a HTML string like "#333" or "#112233".
|
noexcept |
Linearly interpolate this color against another.
|
noexcept |
Check if this color matches another.
|
noexcept |
Fix color bounds if needed.
| union { ... } |
Direct access to the color values.
1.8.9.1