|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
RGBA colour with packed-format conversions (RGB565, RGBA8888). More...
#include <Color.h>
Public Member Functions | |
| Color () | |
| Color (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha=255) | |
| uint16_t | ToRGB565 () const |
| uint32_t | ToRGB888 () const |
| uint32_t | ToARGB8888 () const |
| uint32_t | ToRGBA8888 () const |
| uint32_t | ToABGR8888 () const |
| void | ToFloats (float &r, float &g, float &b, float &a) const |
| void | ToHSV (float &h, float &s, float &v) const |
| Color | Lerp (const Color &to, float t) const |
| Color | Multiply (float factor) const |
| Color | Tint (const Color &tintColor, float intensity) const |
| Color | WithAlpha (uint8_t newAlpha) const |
| uint8_t | GetLuminance () const |
| Color | ToGrayscale () const |
| Color | AdjustBrightness (float factor) const |
| Color | AdjustSaturation (float factor) const |
| bool | operator== (const Color &other) const |
| bool | operator!= (const Color &other) const |
Static Public Member Functions | |
| static Color | FromRGB565 (uint16_t rgb565) |
| static Color | FromRGB888 (uint32_t rgb888) |
| static Color | FromARGB8888 (uint32_t argb8888) |
| static Color | FromRGBA8888 (uint32_t rgba8888) |
| static Color | FromFloats (float r, float g, float b, float a=1.0f) |
| static Color | FromHSV (float h, float s, float v, float a=1.0f) |
Public Attributes | |
| uint8_t | r |
| uint8_t | g |
| uint8_t | b |
| uint8_t | a |
Static Public Attributes | |
| static const Color | Black { 0, 0, 0 } |
| static const Color | White { 255, 255, 255 } |
| static const Color | Red { 255, 0, 0 } |
| static const Color | Green { 0, 255, 0 } |
| static const Color | Blue { 0, 0, 255 } |
| static const Color | Yellow { 255, 255, 0 } |
| static const Color | Cyan { 0, 255, 255 } |
| static const Color | Magenta { 255, 0, 255 } |
| static const Color | Gray { 128, 128, 128 } |
| static const Color | DarkGray { 64, 64, 64 } |
| static const Color | LightGray { 192, 192, 192 } |
| static const Color | Orange { 255, 165, 0 } |
| static const Color | Purple { 128, 0, 128 } |
| static const Color | Brown { 139, 69, 19 } |
| static const Color | Pink { 255, 192, 203 } |
| static const Color | Transparent { 0, 0, 0, 0 } |
| static const Color | SkyBlue { 135, 206, 235 } |
| static const Color | GrassGreen { 124, 252, 0 } |
| static const Color | SunsetOrange { 255, 94, 77 } |
| static const Color | NightBlue { 25, 25, 112 } |
RGBA colour with packed-format conversions (RGB565, RGBA8888).
The Color class provides a unified interface for color handling throughout the engine, supporting RGB, RGBA, and various packed formats with conversion utilities.
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void Deki::Color::ToFloats | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a ) const |
| void Deki::Color::ToHSV | ( | float & | h, |
| float & | s, | ||
| float & | v ) const |
| Color Deki::Color::Multiply | ( | float | factor | ) | const |
|
inline |
|
inline |
| Color Deki::Color::ToGrayscale | ( | ) | const |
| Color Deki::Color::AdjustBrightness | ( | float | factor | ) | const |
| Color Deki::Color::AdjustSaturation | ( | float | factor | ) | const |
|
inline |
|
inline |
| uint8_t Deki::Color::r |
| uint8_t Deki::Color::g |
| uint8_t Deki::Color::b |
| uint8_t Deki::Color::a |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |