本系列文章长期更新修改.
QColor,是Qt里代表颜色的类,是许多更抽象数据结构和作图的基础.
属性:
Types
- enum Spec { Invalid, Rgb, Hsv, Cmyk }
Methods
- __init__ (self, Qt.GlobalColor color)
- __init__ (self, unsigned long rgb)
- __init__ (self, QVariant variant)
- __init__ (self)
- __init__ (self, int r, int g, int b, int a = 255)
- __init__ (self, QString aname)
- __init__ (self, QColor acolor)
- int alpha (self)
- float alphaF (self)
- int black (self)
- float blackF (self)
- int blue (self)
- float blueF (self)
- QColor convertTo (self, Spec colorSpec)
- int cyan (self)
- float cyanF (self)
- QColor dark (self, int f = 200)
- QColor darker (self, int f = 200)
- (int c, int m, int y, int k, int a) getCmyk (self)
- (float c, float m, float y, float k, float a) getCmykF (self)
- (int h, int s, int v, int a) getHsv (self)
- (float h, float s, float v, float a) getHsvF (self)
- (int r, int g, int b, int a) getRgb (self)
- (float r, float g, float b, float a) getRgbF (self)
- int green (self)
- float greenF (self)
- int hue (self)
- float hueF (self)
- bool isValid (self)
- QColor light (self, int f = 150)
- QColor lighter (self, int f = 150)
- int magenta (self)
- float magentaF (self)
- QString name (self)
- int red (self)
- float redF (self)
- unsigned long rgb (self)
- unsigned long rgba (self)
- int saturation (self)
- float saturationF (self)
- s