|
| constexpr | Color (float r, float g, float b, float a=1.0f) noexcept |
| | Constructs a Color from individual float components (0.0f to 1.0f).
|
| |
| constexpr | Color (uint32_t i, Type type=Type::RGB) noexcept |
| | Constructs a Color from a packed 32-bit integer. The 'type' parameter defines the component order.
|
| |
| | Color (std::string hex, float a=1.0f) |
| | Constructs a Color from a hexadecimal string (e.g. "#FF00FF").
|
| |
| constexpr Color | Lerp (const Color &other, float t) const noexcept |
| | Returns a color that is the linear interpolation between this and another color.
|
| |
| Color | Normalize () const |
| | Normalizes this color (treating it as a 4D vector).
|
| |
| constexpr float | Length2 () const noexcept |
| | Returns the squared length of the color vector.
|
| |
| float | Length () const noexcept |
| | Returns the length of the color vector.
|
| |
| constexpr uint32_t | GetInt (Type type=Type::RGBA) const noexcept |
| | Returns the packed 32-bit integer representation.
|
| |
| std::string | GetHex () const |
| | Returns the hexadecimal string representation (e.g. "#FF00FF").
|
| |
| constexpr float | operator[] (uint32_t i) const noexcept |
| | Component access (0: red, 1: green, 2: blue, 3: alpha)
|
| |
|
constexpr float & | operator[] (uint32_t i) |
| |
|
constexpr bool | operator== (const Color &rhs) const noexcept |
| |
|
constexpr bool | operator!= (const Color &rhs) const noexcept |
| |
|
constexpr Color & | operator+= (const Color &rhs) noexcept |
| |
|
constexpr Color & | operator-= (const Color &rhs) noexcept |
| |
|
constexpr Color & | operator*= (const Color &rhs) noexcept |
| |
|
constexpr Color & | operator/= (const Color &rhs) noexcept |
| |
|
constexpr Color & | operator+= (float rhs) noexcept |
| |
|
constexpr Color & | operator-= (float rhs) noexcept |
| |
|
constexpr Color & | operator*= (float rhs) noexcept |
| |
|
constexpr Color & | operator/= (float rhs) noexcept |
| |
|
|
static const Color | Clear = Color(0x00000000, Color::Type::RGBA) |
| |
|
static const Color | Black = Color(0x000000FF, Color::Type::RGBA) |
| |
|
static const Color | Grey = Color(0x808080, Color::Type::RGB) |
| |
|
static const Color | Silver = Color(0xC0C0C0, Color::Type::RGB) |
| |
|
static const Color | White = Color(0xFFFFFF, Color::Type::RGB) |
| |
|
static const Color | Maroon = Color(0x800000, Color::Type::RGB) |
| |
|
static const Color | Red = Color(0xFF0000, Color::Type::RGB) |
| |
|
static const Color | Olive = Color(0x808000, Color::Type::RGB) |
| |
|
static const Color | Yellow = Color(0xFFFF00, Color::Type::RGB) |
| |
|
static const Color | Green = Color(0x00FF00, Color::Type::RGB) |
| |
|
static const Color | Lime = Color(0x008000, Color::Type::RGB) |
| |
|
static const Color | Teal = Color(0x008080, Color::Type::RGB) |
| |
|
static const Color | Aqua = Color(0x00FFFF, Color::Type::RGB) |
| |
|
static const Color | Navy = Color(0x000080, Color::Type::RGB) |
| |
|
static const Color | Blue = Color(0x0000FF, Color::Type::RGB) |
| |
|
static const Color | Purple = Color(0x800080, Color::Type::RGB) |
| |
|
static const Color | Fuchsia = Color(0xFF00FF, Color::Type::RGB) |
| |
|
|
constexpr Color | operator+ (const Color &lhs, const Color &rhs) noexcept |
| |
|
constexpr Color | operator- (const Color &lhs, const Color &rhs) noexcept |
| |
|
constexpr Color | operator* (const Color &lhs, const Color &rhs) noexcept |
| |
|
constexpr Color | operator/ (const Color &lhs, const Color &rhs) noexcept |
| |
|
constexpr Color | operator* (float lhs, const Color &rhs) noexcept |
| |
|
constexpr Color | operator* (const Color &lhs, float rhs) noexcept |
| |
|
constexpr Color | operator/ (const Color &lhs, float rhs) noexcept |
| |
|
constexpr Color | operator+ (const Color &lhs, float rhs) noexcept |
| |
|
constexpr Color | operator- (const Color &lhs, float rhs) noexcept |
| |
|
const Node & | operator>> (const Node &node, Color &color) |
| |
|
Node & | operator<< (Node &node, const Color &color) |
| |
A polished Color class storing RGBA values in a glm::vec4.