PythonQt.QtGui.QColor · declarations 001
Cmyk
instance-attribute
Cmyk: Any
HexArgb
instance-attribute
HexArgb: Any
HexRgb
instance-attribute
HexRgb: Any
Hsl
instance-attribute
Hsl: Any
Hsv
instance-attribute
Hsv: Any
Invalid
instance-attribute
Invalid: Any
NameFormat
instance-attribute
NameFormat: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Rgb
instance-attribute
Rgb: Any
Spec
instance-attribute
Spec: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
alpha
alpha() -> int
X.alpha() -> int
Supplemental documentation: Qt 5 reference:
int QColor::alpha() const
Returns the alpha color component of this color.
See also setAlpha(), alphaF(), and Alpha-Blended Drawing.
Upstream PySide2 reference signatures (binding differences may apply):
alpha(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#alpha
alphaF
alphaF() -> float
X.alphaF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::alphaF() const
Returns the alpha color component of this color.
See also setAlphaF(), alpha(), and Alpha-Blended Drawing.
Upstream PySide2 reference signatures (binding differences may apply):
alphaF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#alphaF
black
black() -> int
X.black() -> int
Supplemental documentation: Qt 5 reference:
int QColor::black() const
Returns the black color component of this color.
See also blackF(), getCmyk(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
black(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#black
blackF
blackF() -> float
X.blackF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::blackF() const
Returns the black color component of this color.
See also black(), getCmykF(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
blackF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#blackF
blue
blue() -> int
X.blue() -> int
Supplemental documentation: Qt 5 reference:
int QColor::blue() const
Returns the blue color component of this color.
See also setBlue(), blueF(), and getRgb().
Upstream PySide2 reference signatures (binding differences may apply):
blue(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#blue
blueF
blueF() -> float
X.blueF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::blueF() const
Returns the blue color component of this color.
See also setBlueF(), blue(), and getRgbF().
Upstream PySide2 reference signatures (binding differences may apply):
blueF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#blueF
colorNames
colorNames() -> tuple
X.colorNames() -> tuple
Supplemental documentation: Qt 5 reference:
[static] QStringList QColor::colorNames()
Returns a QStringList containing the color names Qt knows about.
See also Predefined Colors.
Upstream PySide2 reference signatures (binding differences may apply):
colorNames() -> typing.List[str]
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#colorNames
convertTo
convertTo(colorSpec: Any) -> Any
X.convertTo(colorSpec) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
QColor QColor::convertTo(QColor::Spec colorSpec) const
Creates a copy of this color in the format specified by colorSpec.
See also spec(), toCmyk(), toHsv(), toRgb(), and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
convertTo(self, colorSpec: PySide2.QtGui.QColor.Spec) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#convertTo
cyan
cyan() -> int
X.cyan() -> int
Supplemental documentation: Qt 5 reference:
int QColor::cyan() const
Returns the cyan color component of this color.
See also cyanF(), getCmyk(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
cyan(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#cyan
cyanF
cyanF() -> float
X.cyanF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::cyanF() const
Returns the cyan color component of this color.
See also cyan(), getCmykF(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
cyanF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#cyanF
darker
darker(f: int) -> Any
X.darker(f) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
QColor QColor::darker(int factor \= 200) const
Returns a darker (or lighter) color, but does not change this object.
If the factor is greater than 100, this functions returns a darker color. Setting factor to 300 returns a color that has one-third the brightness. If the factor is less than 100, the return color is lighter, but we recommend using the lighter() function for this purpose. If the factor is 0 or negative, the return value is unspecified.
The function converts the current color to HSV, divides the value (V) component by factor and converts the color back to it's original color spec.
This function was introduced in Qt 4.3.
See also lighter() and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
darker(self, f: int=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#darker
fromCmyk
fromCmyk(c: int, m: int, y: int, k: int, a: int) -> Any
X.fromCmyk(c, m, y, k, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromCmyk(int c, int m, int y, int k, int a \= 255)
Static convenience function that returns a QColor constructed from the given CMYK color values: c (cyan), m (magenta), y (yellow), k (black), and a (alpha-channel, i.e. transparency).
All the values must be in the range 0-255.
See also toCmyk(), fromCmykF(), isValid(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromCmyk(c: int, m: int, y: int, k: int, a: int=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromCmyk
fromCmykF
fromCmykF(c: float, m: float, y: float, k: float, a: float) -> Any
X.fromCmykF(c, m, y, k, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a \= 1.0)
This is an overloaded function.
Static convenience function that returns a QColor constructed from the given CMYK color values: c (cyan), m (magenta), y (yellow), k (black), and a (alpha-channel, i.e. transparency).
All the values must be in the range 0.0-1.0.
See also toCmyk(), fromCmyk(), isValid(), and The CMYK Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromCmykF(c: float, m: float, y: float, k: float, a: float=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromCmykF
fromHsl
fromHsl(h: int, s: int, l: int, a: int) -> Any
X.fromHsl(h, s, l, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromHsl(int h, int s, int l, int a \= 255)
Static convenience function that returns a QColor constructed from the HSV color values, h (hue), s (saturation), l (lightness), and a (alpha-channel, i.e. transparency).
The value of s, l, and a must all be in the range 0-255; the value of h must be in the range 0-359.
This function was introduced in Qt 4.6.
See also toHsl(), fromHslF(), isValid(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromHsl(h: int, s: int, l: int, a: int=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromHsl
fromHslF
fromHslF(h: float, s: float, l: float, a: float) -> Any
X.fromHslF(h, s, l, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromHslF(qreal h, qreal s, qreal l, qreal a \= 1.0)
This is an overloaded function.
Static convenience function that returns a QColor constructed from the HSV color values, h (hue), s (saturation), l (lightness), and a (alpha-channel, i.e. transparency).
All the values must be in the range 0.0-1.0.
This function was introduced in Qt 4.6.
See also toHsl(), fromHsl(), isValid(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromHslF(h: float, s: float, l: float, a: float=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromHslF
fromHsv
fromHsv(h: int, s: int, v: int, a: int) -> Any
X.fromHsv(h, s, v, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromHsv(int h, int s, int v, int a \= 255)
Static convenience function that returns a QColor constructed from the HSV color values, h (hue), s (saturation), v (value), and a (alpha-channel, i.e. transparency).
The value of s, v, and a must all be in the range 0-255; the value of h must be in the range 0-359.
See also toHsv(), fromHsvF(), isValid(), and The HSV Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromHsv(h: int, s: int, v: int, a: int=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromHsv
fromHsvF
fromHsvF(h: float, s: float, v: float, a: float) -> Any
X.fromHsvF(h, s, v, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromHsvF(qreal h, qreal s, qreal v, qreal a \= 1.0)
This is an overloaded function.
Static convenience function that returns a QColor constructed from the HSV color values, h (hue), s (saturation), v (value), and a (alpha-channel, i.e. transparency).
All the values must be in the range 0.0-1.0.
See also toHsv(), fromHsv(), isValid(), and The HSV Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
fromHsvF(h: float, s: float, v: float, a: float=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromHsvF
fromRgb
fromRgb(r: Any, g: Any, b: Any, a: Any) -> Any
X.fromRgb(r, g, b, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromRgb(QRgb rgb)
Static convenience function that returns a QColor constructed from the given QRgb value rgb.
The alpha component of rgb is ignored (i.e. it is automatically set to 255), use the fromRgba() function to include the alpha-channel specified by the given QRgb value.
See also fromRgba(), fromRgbF(), toRgb(), and isValid().
[static] QColor QColor::fromRgb(int r, int g, int b, int a \= 255)
Static convenience function that returns a QColor constructed from the RGB color values, r (red), g (green), b (blue), and a (alpha-channel, i.e. transparency).
All the values must be in the range 0-255.
See also toRgb(), fromRgba64(), fromRgbF(), and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
fromRgb(r: int, g: int, b: int, a: int=...) -> PySide2.QtGui.QColor
fromRgb(rgb: int) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromRgb
fromRgbF
fromRgbF(r: float, g: float, b: float, a: float) -> Any
X.fromRgbF(r, g, b, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromRgbF(qreal r, qreal g, qreal b, qreal a \= 1.0)
Static convenience function that returns a QColor constructed from the RGB color values, r (red), g (green), b (blue), and a (alpha-channel, i.e. transparency).
The alpha value must be in the range 0.0-1.0. If any of the other values are outside the
range of 0.0-1.0 the color model will be set as ExtendedRgb.
See also fromRgb(), fromRgba64(), toRgb(), and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
fromRgbF(r: float, g: float, b: float, a: float=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromRgbF
fromRgba
fromRgba(rgba: int) -> Any
X.fromRgba(rgba) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromRgba(QRgb rgba)
Static convenience function that returns a QColor constructed from the given QRgb value rgba.
Unlike the fromRgb() function, the alpha-channel specified by the given QRgb value is included.
See also fromRgb(), fromRgba64(), and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
fromRgba(rgba: int) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromRgba
fromRgba64
fromRgba64(r: int, g: int, b: int, a: int) -> Any
X.fromRgba64(r, g, b, a) -> PythonQt.QtGui.QColor
Supplemental documentation: Qt 5 reference:
[static] QColor QColor::fromRgba64(ushort r, ushort g, ushort b, ushort a \= USHRT_MAX)
Static convenience function that returns a QColor constructed from the RGBA64 color values, r (red), g (green), b (blue), and a (alpha-channel, i.e. transparency).
This function was introduced in Qt 5.6.
See also fromRgb(), fromRgbF(), toRgb(), and isValid().
[static] QColor QColor::fromRgba64(QRgba64 rgba64)
Static convenience function that returns a QColor constructed from the given QRgba64 value rgba64.
This function was introduced in Qt 5.6.
See also fromRgb(), fromRgbF(), toRgb(), and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
fromRgba64(r: int, g: int, b: int, a: int=...) -> PySide2.QtGui.QColor
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#fromRgba64
getHsl
getHsl(h: Any, s: Any, l: Any, a: Any) -> Any
X.getHsl(h, s, l, a)
Supplemental documentation: Qt 5 reference:
void QColor::getHsl(int *h, int *s, int *l, int *a \= nullptr) const
Sets the contents pointed to by h, s, l, and a, to the hue, saturation, lightness, and alpha-channel (transparency) components of the color's HSL value.
These components can be retrieved individually using the hslHue(), hslSaturation(), lightness() and alpha() functions.
This function was introduced in Qt 4.6.
See also getHslF(), setHsl(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
getHsl(self) -> typing.Tuple[int, int, int, int]
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#getHsl
getHslF
getHslF(h: Any, s: Any, l: Any, a: Any) -> Any
X.getHslF(h, s, l, a)
Supplemental documentation: Qt 5 reference:
void QColor::getHslF(qreal *h, qreal *s, qreal *l, qreal *a \= nullptr) const
Sets the contents pointed to by h, s, l, and a, to the hue, saturation, lightness, and alpha-channel (transparency) components of the color's HSL value.
These components can be retrieved individually using the hslHueF(), hslSaturationF(), lightnessF() and alphaF() functions.
This function was introduced in Qt 4.6.
See also getHsl(), setHslF(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
getHslF(self) -> typing.Tuple[float, float, float, float]
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#getHslF
green
green() -> int
X.green() -> int
Supplemental documentation: Qt 5 reference:
int QColor::green() const
Returns the green color component of this color.
See also setGreen(), greenF(), and getRgb().
Upstream PySide2 reference signatures (binding differences may apply):
green(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#green
greenF
greenF() -> float
X.greenF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::greenF() const
Returns the green color component of this color.
See also setGreenF(), green(), and getRgbF().
Upstream PySide2 reference signatures (binding differences may apply):
greenF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#greenF
hslHue
hslHue() -> int
X.hslHue() -> int
Supplemental documentation: Qt 5 reference:
int QColor::hslHue() const
Returns the HSL hue color component of this color.
This function was introduced in Qt 4.6.
See also hslHueF(), hsvHue(), getHsl(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
hslHue(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hslHue
hslHueF
hslHueF() -> float
X.hslHueF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::hslHueF() const
Returns the HSL hue color component of this color.
This function was introduced in Qt 4.6.
See also hslHue(), hsvHueF(), and getHslF().
Upstream PySide2 reference signatures (binding differences may apply):
hslHueF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hslHueF
hslSaturation
hslSaturation() -> int
X.hslSaturation() -> int
Supplemental documentation: Qt 5 reference:
int QColor::hslSaturation() const
Returns the HSL saturation color component of this color.
This function was introduced in Qt 4.6.
See also hslSaturationF(), hsvSaturation(), getHsl(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
hslSaturation(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hslSaturation
hslSaturationF
hslSaturationF() -> float
X.hslSaturationF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::hslSaturationF() const
Returns the HSL saturation color component of this color.
This function was introduced in Qt 4.6.
See also hslSaturation(), hsvSaturationF(), getHslF(), and The HSL Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
hslSaturationF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hslSaturationF
hsvHue
hsvHue() -> int
X.hsvHue() -> int
Supplemental documentation: Qt 5 reference:
int QColor::hsvHue() const
Returns the HSV hue color component of this color.
See also hueF(), hslHue(), getHsv(), and The HSV Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
hsvHue(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hsvHue
hsvHueF
hsvHueF() -> float
X.hsvHueF() -> float
Supplemental documentation: Qt 5 reference:
qreal QColor::hsvHueF() const
Returns the hue color component of this color.
See also hue(), hslHueF(), getHsvF(), and The HSV Color Model.
Upstream PySide2 reference signatures (binding differences may apply):
hsvHueF(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qcolor.html#hsvHueF