diff --git a/libui/include/ui/Color.h b/libui/include/ui/Color.h index 39d8db91..4fbf29c2 100644 --- a/libui/include/ui/Color.h +++ b/libui/include/ui/Color.h @@ -13,6 +13,46 @@ namespace ui u8 colors[4]; }; + /** + * @brief Return the blue value of this color. + * + * @return constexpr u8 The blue value. + */ + constexpr u8 red() const + { + return colors[2]; + } + + /** + * @brief Return the green value of this color. + * + * @return constexpr u8 The green value. + */ + constexpr u8 green() const + { + return colors[1]; + } + + /** + * @brief Return the blue value of this color. + * + * @return constexpr u8 The blue value. + */ + constexpr u8 blue() const + { + return colors[0]; + } + + /** + * @brief Return the alpha value of this color. + * + * @return constexpr u8 The alpha value. + */ + constexpr u8 alpha() const + { + return colors[3]; + } + /** * @brief Construct a new color from a 32-bit ARGB integer. *