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
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
FTXUI ftxui::literals:: 命名空间