|
BuGUI
BUtton Grid User Interface
|
Generic colour class holding RGBA values of a primary and a secondary colour. The blinking and pulsing states indicate discrete or smooth cycling between the primary and secondary colour. More...
#include <color.hpp>
Public Types | |
| enum | states : uint8_t { constant , blinking , pulsing } |
| using | rgba = std::array<uint8_t, 4> |
Public Member Functions | |
| void | set (uint8_t &&red=0, uint8_t &&green=0, uint8_t &&blue=0, uint8_t &&alpha=255) |
| Sets the primary colour along with the constant state. | |
| void | set_blink (uint8_t &&red, uint8_t &&green, uint8_t &&blue, uint8_t &&alpha=255, uint8_t &&secondary_red=0, uint8_t &&secondary_green=0, uint8_t &&secondary_blue=0, uint8_t &&secondary_alpha=255) |
| Sets primary and secondary colour along with the blinking state. | |
| void | set_pulse (uint8_t &&red, uint8_t &&green, uint8_t &&blue, uint8_t &&alpha=255, uint8_t &&secondary_red=0, uint8_t &&secondary_green=0, uint8_t &&secondary_blue=0, uint8_t &&secondary_alpha=255) |
| Sets primary and secondary colour along with the pulsing state. | |
| rgba | get () const noexcept |
| Retrieves the primary colour as rgba values. | |
| rgba | get_secondary () const noexcept |
| Retrieves the secondary colour as rgba values. | |
| states | get_state () const noexcept |
| Retrieves the current state. | |
| void | clear () |
| Resets primary colour, secondary colour and state to their initial values. | |
| bool | is_clear () |
| Checks if the primary colour, secondary colour and state are set to their initial values. | |
| bool | operator== (const color &other) const |
Generic colour class holding RGBA values of a primary and a secondary colour. The blinking and pulsing states indicate discrete or smooth cycling between the primary and secondary colour.
| enum bugui::color::states : uint8_t |