Represents a 4-component floating point color (RGBA).
More...
#include <AUI/Common/AColor.h>
|
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) |
| Construct with hex integer.
|
|
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)
|
|
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 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 } |
|
Represents a 4-component floating point color (RGBA).
◆ AColor()
AColor::AColor |
( |
unsigned int | color | ) |
|
|
inlineconstexpr |
Construct with hex integer.
- Parameters
-
color | integer representing color in 0xRRGGBBAA |
AColor(0xff0000ff)
will represent opaque bright red
◆ fromAARRGGBB()
static constexpr AColor AColor::fromAARRGGBB |
( |
unsigned int | color | ) |
|
|
inlinestaticconstexpr |
Construct with hex integer.
- Parameters
-
color | integer representing color in 0xAARRGGBB |
AColor(0xff0000ff)
will represent opaque bright blue
◆ fromRRGGBB()
static constexpr AColor AColor::fromRRGGBB |
( |
unsigned int | color | ) |
|
|
inlinestaticconstexpr |
Construct with hex integer.
- Parameters
-
color | integer representing color in 0xRRGGBB |
AColor(0x00ff00)
will represent opaque bright green
◆ mul()
AColor AColor::mul |
( |
float | d | ) |
const |
|
inlineconstexpr |
Multiply all color components except alpha channel (rgb * d, a)
- Parameters
-
- Returns
- multiplied color
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