3#ifndef FTXUI_SCREEN_COLOR_HPP
4#define FTXUI_SCREEN_COLOR_HPP
32 Color(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 255);
33 static Color RGB(uint8_t red, uint8_t green, uint8_t blue);
34 static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value);
35 static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
318 std::string
Print(
bool is_background_color)
const;
322 enum class ColorType : uint8_t {
328 ColorType type_ = ColorType::Palette1;
339Color operator""_rgb(
unsigned long long int combined);
static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value)
從 HSV 表示建立一個顏色。 https://en.wikipedia.org/wiki/HSL_and_HSV
static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
從 RGBA 表示建立一個顏色。 https://en.wikipedia.org/wiki/RGB_color_model
static Color Blend(const Color &lhs, const Color &rhs)
使用 alpha 色版將兩種顏色混合在一起。
bool operator!=(const Color &rhs) const
bool operator==(const Color &rhs) const
static Color RGB(uint8_t red, uint8_t green, uint8_t blue)
從 RGB 表示建立一個顏色。 https://en.wikipedia.org/wiki/RGB_color_model
std::string Print(bool is_background_color) const
static Color Interpolate(float t, const Color &a, const Color &b)
static Color HSVA(uint8_t hue, uint8_t saturation, uint8_t value, uint8_t alpha)
從 HSV 表示建立一個顏色。 https://en.wikipedia.org/wiki/HSL_and_HSV
Color 是一個在終端使用者介面中表示顏色的類別。
FTXUI ftxui::literals:: 命名空間