Represents a 4-component floating point color.
More...
Represents a 4-component floating point color.
|
constexpr | AColor (const glm::vec4 &v) |
|
API_AUI_CORE | AColor (const AString &s) |
|
constexpr | AColor (float scalar) |
|
constexpr | AColor (float r, float g, float b) |
|
constexpr | AColor (float r, float g, float b, float a) |
|
constexpr | AColor (unsigned int color) |
|
constexpr AColor | operator* (float other) const |
|
API_AUI_CORE AString | toString () const |
|
API_AUI_CORE float | readabilityOfForegroundColor (const AColor &foreground) |
|
AColor | opacify (float alpha) const noexcept |
| Increases the alpha channel by the given value.
|
|
AColor | transparentize (float alpha) const noexcept |
| Decreases the alpha channel by the given value.
|
|
constexpr AColor | mul (float d) const |
| Multiply all color components except alpha channel (rgb * d, a) More...
|
|
constexpr AColor | darker (float d) const |
|
constexpr AColor | lighter (float d) const |
|
bool | isFullyTransparent () const |
|
bool | isFullyOpaque () const |
|
AColor | readableBlackOrWhite () const |
|
AColor | opacify (float d) |
|
|
static constexpr AColor | fromAARRGGBB (unsigned int color) |
|
static constexpr AColor | fromRRGGBB (unsigned int color) |
|
|
static const AColor | BLACK = {0.f, 0.f, 0.f, 1.f} |
|
static const AColor | WHITE = {1.f, 1.f, 1.f, 1.f} |
|
static const AColor | RED = {1.f, 0.f, 0.f, 1.f} |
|
static const AColor | GREEN = {0.f, 1.f, 0.f, 1.f} |
|
static const AColor | BLUE = {0.f, 0.f, 1.f, 1.f} |
|
static const AColor | GRAY = {0.5f, 0.5f, 0.5f, 1.f} |
|
◆ mul()
constexpr AColor AColor::mul |
( |
float |
d | ) |
const |
|
inlineconstexpr |
Multiply all color components except alpha channel (rgb * d, a)
- Parameters
-
- Returns
- supplyValue color
#include <AUI/Common/AColor.h>
The documentation for this class was generated from the following files:
- aui.core/src/AUI/Common/AColor.h
- aui.core/src/AUI/Common/AColor.cpp