|
FTXUI 6.1.9
C++ functional terminal UI.
|
A class representing terminal colors. More...
#include <color.hpp>
Public Member Functions | |
| Color () | |
| Build a transparent color. | |
| Color (Palette1 index) | |
| Build a transparent color. | |
| Color (Palette16 index) | |
| Build a color using the Palette16 colors. | |
| Color (Palette256 index) | |
| Build a color using Palette256 colors. | |
| Color (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha=255) | |
| Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model. | |
| bool | operator== (const Color &rhs) const |
| bool | operator!= (const Color &rhs) const |
| std::string | Print (bool is_background_color) const |
| bool | IsOpaque () const |
Static Public Member Functions | |
| static Color | RGB (uint8_t red, uint8_t green, uint8_t blue) |
| Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model. | |
| static Color | HSV (uint8_t hue, uint8_t saturation, uint8_t value) |
| Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV. | |
| static Color | RGBA (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) |
| Build a Color from its RGBA representation. https://en.wikipedia.org/wiki/RGB_color_model. | |
| static Color | HSVA (uint8_t hue, uint8_t saturation, uint8_t value, uint8_t alpha) |
| Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV. | |
| static Color | Interpolate (float t, const Color &a, const Color &b) |
| static Color | Blend (const Color &lhs, const Color &rhs) |
| Blend two colors together using the alpha channel. | |
A class representing terminal colors.
| enum Palette16 : uint8_t |
| enum Palette256 : uint8_t |
|
default |
Build a transparent color.
Build a transparent color.
Definition at line 82 of file screen/color.cpp.
Build a color using the Palette16 colors.
Definition at line 86 of file screen/color.cpp.
| Color | ( | Palette256 | index | ) |
Build a color using Palette256 colors.
Definition at line 91 of file screen/color.cpp.
| Color | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue, | ||
| uint8_t | alpha = 255 ) |
Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
| red | The quantity of red [0,255] |
| green | The quantity of green [0,255] |
| blue | The quantity of blue [0,255] |
| alpha | The quantity of alpha [0,255] |
Definition at line 108 of file screen/color.cpp.
|
static |
Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
| red | The quantity of red [0,255] |
| green | The quantity of green [0,255] |
| blue | The quantity of blue [0,255] |
Definition at line 153 of file screen/color.cpp.
|
static |
Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV.
| h | The hue of the color [0,255] |
| s | The "colorfulness" [0,255]. |
| v | The "Lightness" [0,255] |
Definition at line 207 of file screen/color.cpp.
|
static |
Build a Color from its RGBA representation. https://en.wikipedia.org/wiki/RGB_color_model.
| red | The quantity of red [0,255] |
| green | The quantity of green [0,255] |
| blue | The quantity of blue [0,255] |
| alpha | The quantity of alpha [0,255] |
Definition at line 166 of file screen/color.cpp.
|
static |
Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV.
| h | The hue of the color [0,255] |
| s | The "colorfulness" [0,255]. |
| v | The "Lightness" [0,255] |
| alpha | The quantity of alpha [0,255] |
Definition at line 179 of file screen/color.cpp.
Definition at line 212 of file screen/color.cpp.
Blend two colors together using the alpha channel.
Definition at line 281 of file screen/color.cpp.
| bool operator== | ( | const Color & | rhs | ) | const |
Definition at line 37 of file screen/color.cpp.
| bool operator!= | ( | const Color & | rhs | ) | const |
Definition at line 42 of file screen/color.cpp.
| std::string Print | ( | bool | is_background_color | ) | const |
Definition at line 46 of file screen/color.cpp.