CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
GColor.h 文件参考

class  GColor
 包含rgba分量的颜色 更多...
class  GColorHSV
 包含hsva分量的颜色 更多...

命名空间

namespace  UtilsColor
 namespace UtilsColor 配色方案工具集

函数

GColor operator* (const GColor &c, float factor)
GColor operator* (const GColor &c1, const GColor &c2)
GColor operator/ (const GColor &c, float factor)
GColor operator/ (const GColor &c1, const GColor &c2)
GColor operator+ (const GColor &c1, const GColor &c2)
GColor operator- (const GColor &c1, const GColor &c2)
UI_EXP GColor UtilsColor::HSVColor (float h, float s=1, float v=1, UINT alpha=255)
UI_EXP LPCTSTR UtilsColor::ParseColor (LPCTSTR str_color, LPCTSTR end, GColor *out_color)
UI_EXP bool UtilsColor::ParseStringToColor (const TCHAR *lpcolor, GColor *color)
UI_EXP BOOL UtilsColor::ParseHSVColor (LPCTSTR lpcolor, float *h, float *s, float *v, float *alpha)
UI_EXP GColor UtilsColor::Get24PhaseColor (int i)
UI_EXP void UtilsColor::RGBToHSV (const GColor &color, float *h, float *s, float *v)
UI_EXP void UtilsColor::RGBToHSV (float r, float g, float b, float *h, float *s, float *v)
 RGBToHSV HSVToRGB相互转换
UI_EXP void UtilsColor::HSVToRGB (float *r, float *g, float *b, float h, float s, float v)
UI_EXP void UtilsColor::RGBToHSL (float r, float g, float b, float *h, float *s, float *l)
 RGBToHSL和HSLToRGB相互转换
UI_EXP void UtilsColor::HSLToRGB (float *r, float *g, float *b, float h, float s, float l)
UI_EXP void UtilsColor::RGBToYUV (unsigned char R, unsigned char G, unsigned char B, float *y, float *u, float *v)
 rgb -> yuv
UI_EXP void UtilsColor::YUVToRGB (float Y, float U, float V, unsigned char &R, unsigned char &G, unsigned char &B)
 yuv -> rgb
float UtilsColor::Luminanace (uint8_t r, uint8_t g, uint8_t b)
 返回颜色明度值。算法取自国际标准。https://www.w3.org/TR/WCAG/#dfn-relative-luminance
float UtilsColor::ContrastRatio (const GColor &c1, const GColor &c2)
 对比度

函数说明

◆ operator*() [1/2]

GColor operator* ( const GColor & c,
float factor )

◆ operator*() [2/2]

GColor operator* ( const GColor & c1,
const GColor & c2 )

◆ operator+()

GColor operator+ ( const GColor & c1,
const GColor & c2 )

◆ operator-()

GColor operator- ( const GColor & c1,
const GColor & c2 )

◆ operator/() [1/2]

GColor operator/ ( const GColor & c,
float factor )

◆ operator/() [2/2]

GColor operator/ ( const GColor & c1,
const GColor & c2 )
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2026 · CBlueStudio 版权所有