- All Implemented Interfaces:
QtObjectInterface
,Cloneable
Colors based on RGB, HSV or CMYK values
Java wrapper for Qt class QColor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enumQColor::NameFormat
static enum
Java wrapper for Qt enumQColor::Spec
-
Constructor Summary
ConstructorDescriptionQColor()
SeeQColor::
QColor() QColor
(int rgb) QColor
(int r, int g, int b) Overloaded constructor forQColor(int, int, int, int)
witha = 255
.QColor
(int r, int g, int b, int a) QColor
(Qt.GlobalColor color) QColor
(QColor.Spec spec) SeeQColor::
QColor(QColor::Spec) QColor
(QColor.Spec spec, short a1, short a2, short a3, short a4) Overloaded constructor forQColor(io.qt.gui.QColor.Spec, short, short, short, short, short)
witha5 = 0
.QColor
(QColor.Spec spec, short a1, short a2, short a3, short a4, short a5) SeeQColor::
QColor(QColor::Spec, ushort, ushort, ushort, ushort, ushort) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
alpha()
final double
alphaF()
final void
assign
(Qt.GlobalColor color) final void
final void
Overloaded function forassign(io.qt.gui.QColor)
.final void
Overloaded function forassign(io.qt.gui.QColor)
.final int
black()
final double
blackF()
final int
blue()
final double
blueF()
clone()
Creates and returns a copy of this object.static QStringList
final QColor
convertTo
(QColor.Spec colorSpec) final int
cyan()
final double
cyanF()
final QColor
darker()
Overloaded function fordarker(int)
withf = 200
.final QColor
darker
(int f) final boolean
Overloaded function forequals(io.qt.gui.QColor)
.final boolean
final boolean
Overloaded function forequals(io.qt.gui.QColor)
.final boolean
Overloaded function forequals(io.qt.gui.QColor)
.boolean
static QColor
fromCmyk
(int c, int m, int y, int k) Overloaded function forfromCmyk(int, int, int, int, int)
witha = 255
.static QColor
fromCmyk
(int c, int m, int y, int k, int a) static QColor
fromCmykF
(double c, double m, double y, double k) Overloaded function forfromCmykF(double, double, double, double, double)
witha = 1.0
.static QColor
fromCmykF
(double c, double m, double y, double k, double a) static QColor
fromHsl
(int h, int s, int l) Overloaded function forfromHsl(int, int, int, int)
witha = 255
.static QColor
fromHsl
(int h, int s, int l, int a) static QColor
fromHslF
(double h, double s, double l) Overloaded function forfromHslF(double, double, double, double)
witha = 1.0
.static QColor
fromHslF
(double h, double s, double l, double a) static QColor
fromHsv
(int h, int s, int v) Overloaded function forfromHsv(int, int, int, int)
witha = 255
.static QColor
fromHsv
(int h, int s, int v, int a) static QColor
fromHsvF
(double h, double s, double v) Overloaded function forfromHsvF(double, double, double, double)
witha = 1.0
.static QColor
fromHsvF
(double h, double s, double v, double a) static QColor
fromRgb
(int rgb) static QColor
fromRgb
(int r, int g, int b) Overloaded function forfromRgb(int, int, int, int)
witha = 255
.static QColor
fromRgb
(int r, int g, int b, int a) static QColor
fromRgba
(int rgba) static QColor
fromRgba64
(short r, short g, short b) Overloaded function forfromRgba64(short, short, short, short)
witha = 0xffff
.static QColor
fromRgba64
(short r, short g, short b, short a) static QColor
fromRgba64
(QRgba64 rgba) static QColor
fromRgbF
(double r, double g, double b) Overloaded function forfromRgbF(double, double, double, double)
witha = 1.0
.static QColor
fromRgbF
(double r, double g, double b, double a) final int
green()
final double
greenF()
int
hashCode()
Returns the objects's hash code computed byqHash(QColor)
.final int
hslHue()
final double
hslHueF()
final int
final double
final int
hsvHue()
final double
hsvHueF()
final int
final double
final int
hue()
final double
hueF()
final boolean
isValid()
static boolean
isValidColor
(String name) final QColor
lighter()
Overloaded function forlighter(int)
withf = 150
.final QColor
lighter
(int f) final int
final double
final int
magenta()
final double
magentaF()
final String
name()
final String
name
(QColor.NameFormat format) static int
qGray
(int rgb) SeeqGray(QRgb)
static int
qGray
(int r, int g, int b) static boolean
qIsGray
(int rgb) SeeqIsGray(QRgb)
static int
qPremultiply
(int x) SeeqPremultiply(QRgb)
void
readFrom
(QDataStream arg__1) Seeoperator>>(QDataStream&,
QColor&) final int
red()
final double
redF()
final int
rgb()
final int
rgba()
final QRgba64
rgba64()
final int
final double
final void
setAlpha
(int alpha) final void
setAlphaF
(double alpha) final void
setBlue
(int blue) final void
setBlueF
(double blue) final void
setCmyk
(int c, int m, int y, int k) Overloaded function forsetCmyk(int, int, int, int, int)
witha = 255
.final void
setCmyk
(int c, int m, int y, int k, int a) final void
setCmykF
(double c, double m, double y, double k) Overloaded function forsetCmykF(double, double, double, double, double)
witha = 1.0
.final void
setCmykF
(double c, double m, double y, double k, double a) final void
setGreen
(int green) final void
setGreenF
(double green) final void
setHsl
(int h, int s, int l) Overloaded function forsetHsl(int, int, int, int)
witha = 255
.final void
setHsl
(int h, int s, int l, int a) final void
setHslF
(double h, double s, double l) Overloaded function forsetHslF(double, double, double, double)
witha = 1.0
.final void
setHslF
(double h, double s, double l, double a) final void
setHsv
(int h, int s, int v) Overloaded function forsetHsv(int, int, int, int)
witha = 255
.final void
setHsv
(int h, int s, int v, int a) final void
setHsvF
(double h, double s, double v) Overloaded function forsetHsvF(double, double, double, double)
witha = 1.0
.final void
setHsvF
(double h, double s, double v, double a) final void
setNamedColor
(String name) final void
setRed
(int red) final void
setRedF
(double red) final void
setRgb
(int rgb) final void
setRgb
(int r, int g, int b) Overloaded function forsetRgb(int, int, int, int)
witha = 255
.final void
setRgb
(int r, int g, int b, int a) final void
setRgba
(int rgba) final void
final void
setRgbF
(double r, double g, double b) Overloaded function forsetRgbF(double, double, double, double)
witha = 1.0
.final void
setRgbF
(double r, double g, double b, double a) final QColor.Spec
spec()
final QColor
toCmyk()
final QColor
final QColor
toHsl()
final QColor
toHsv()
final QColor
toRgb()
toString()
Seeoperator<<(QDebug,
QColor) final int
value()
final double
valueF()
void
writeTo
(QDataStream arg__1) Seeoperator<<(QDataStream&,
QColor) final int
yellow()
final double
yellowF()
Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QColor
public QColor()See
QColor::
QColor() -
QColor
- Parameters:
color
-
-
QColor
See
QColor::
QColor(QColor::Spec) - Parameters:
spec
-
-
QColor
See
QColor::
QColor(QColor::Spec, ushort, ushort, ushort, ushort, ushort) - Parameters:
spec
-a1
-a2
-a3
-a4
-a5
-
-
QColor
- Parameters:
rgba64
-- Since:
- This function was introduced in Qt 5.6.
-
QColor
- Parameters:
name
-
-
QColor
- Parameters:
color
-
-
QColor
public QColor(int r, int g, int b, int a) - Parameters:
r
-g
-b
-a
-
-
QColor
public QColor(int rgb) - Parameters:
rgb
-
-
QColor
Overloaded constructor for
QColor(io.qt.gui.QColor.Spec, short, short, short, short, short)
witha5 = 0
. -
QColor
public QColor(int r, int g, int b) Overloaded constructor for
QColor(int, int, int, int)
witha = 255
.
-
-
Method Details
-
alpha
- Returns:
-
alphaF
- Returns:
-
black
- Returns:
-
blackF
- Returns:
-
blue
- Returns:
-
blueF
- Returns:
-
convertTo
- Parameters:
colorSpec
-- Returns:
-
cyan
- Returns:
-
cyanF
- Returns:
-
darker
- Parameters:
f
-- Returns:
- Since:
- This function was introduced in Qt 4.3.
-
green
- Returns:
-
greenF
- Returns:
-
hslHue
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
hslHueF
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
hslSaturation
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
hslSaturationF
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
hsvHue
- Returns:
-
hsvHueF
- Returns:
-
hsvSaturation
- Returns:
-
hsvSaturationF
- Returns:
-
hue
- Returns:
-
hueF
- Returns:
-
isValid
- Returns:
-
lighter
- Parameters:
f
-- Returns:
- Since:
- This function was introduced in Qt 4.3.
-
lightness
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
lightnessF
- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
magenta
- Returns:
-
magentaF
- Returns:
-
name
- Returns:
-
name
- Parameters:
format
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
writeTo
See
operator<<(QDataStream&,
QColor) - Parameters:
arg__1
-
-
assign
- Parameters:
arg__1
-
-
assign
- Parameters:
color
-
-
equals
- Parameters:
c
-- Returns:
-
readFrom
See
operator>>(QDataStream&,
QColor&) - Parameters:
arg__1
-
-
red
- Returns:
-
redF
- Returns:
-
rgb
- Returns:
-
rgba
- Returns:
-
rgba64
- Returns:
- Since:
- This function was introduced in Qt 5.6.
-
saturation
- Returns:
-
saturationF
- Returns:
-
setAlpha
- Parameters:
alpha
-
-
setAlphaF
- Parameters:
alpha
-
-
setBlue
- Parameters:
blue
-
-
setBlueF
- Parameters:
blue
-
-
setCmyk
- Parameters:
c
-m
-y
-k
-a
-
-
setCmykF
- Parameters:
c
-m
-y
-k
-a
-
-
setGreen
- Parameters:
green
-
-
setGreenF
- Parameters:
green
-
-
setHsl
- Parameters:
h
-s
-l
-a
-- Since:
- This function was introduced in Qt 4.6.
-
setHslF
- Parameters:
h
-s
-l
-a
-- Since:
- This function was introduced in Qt 4.6.
-
setHsv
- Parameters:
h
-s
-v
-a
-
-
setHsvF
- Parameters:
h
-s
-v
-a
-
-
setNamedColor
- Parameters:
name
-
-
setRed
- Parameters:
red
-
-
setRedF
- Parameters:
red
-
-
setRgb
- Parameters:
r
-g
-b
-a
-
-
setRgb
- Parameters:
rgb
-
-
setRgbF
- Parameters:
r
-g
-b
-a
-
-
setRgba
- Parameters:
rgba
-
-
setRgba64
- Parameters:
rgba
-- Since:
- This function was introduced in Qt 5.6.
-
spec
- Returns:
-
toCmyk
- Returns:
-
toExtendedRgb
- Returns:
- Since:
- This function was introduced in Qt 5.14.
-
toHsl
- Returns:
-
toHsv
- Returns:
-
toRgb
- Returns:
-
value
- Returns:
-
valueF
- Returns:
-
yellow
- Returns:
-
yellowF
- Returns:
-
colorNames
- Returns:
-
fromCmyk
- Parameters:
c
-m
-y
-k
-a
-- Returns:
-
fromCmykF
- Parameters:
c
-m
-y
-k
-a
-- Returns:
-
fromHsl
- Parameters:
h
-s
-l
-a
-- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
fromHslF
- Parameters:
h
-s
-l
-a
-- Returns:
- Since:
- This function was introduced in Qt 4.6.
-
fromHsv
- Parameters:
h
-s
-v
-a
-- Returns:
-
fromHsvF
- Parameters:
h
-s
-v
-a
-- Returns:
-
fromRgb
- Parameters:
r
-g
-b
-a
-- Returns:
-
fromRgb
- Parameters:
rgb
-- Returns:
-
fromRgbF
- Parameters:
r
-g
-b
-a
-- Returns:
-
fromRgba
- Parameters:
rgba
-- Returns:
-
fromRgba64
- Parameters:
rgba
-- Returns:
- Since:
- This function was introduced in Qt 5.6.
-
fromRgba64
- Parameters:
r
-g
-b
-a
-- Returns:
- Since:
- This function was introduced in Qt 5.6.
-
isValidColor
- Parameters:
name
-- Returns:
- Since:
- This function was introduced in Qt 4.7.
-
qGray
public static int qGray(int r, int g, int b) - Parameters:
r
-g
-b
-- Returns:
-
qGray
public static int qGray(int rgb) See
qGray(QRgb)
- Parameters:
rgb
-- Returns:
-
qIsGray
public static boolean qIsGray(int rgb) See
qIsGray(QRgb)
- Parameters:
rgb
-- Returns:
-
qPremultiply
public static int qPremultiply(int x) See
qPremultiply(QRgb)
- Parameters:
x
-- Returns:
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QColor)
. -
toString
See
operator<<(QDebug,
QColor) -
clone
Creates and returns a copy of this object.
-
darker
Overloaded function for
darker(int)
withf = 200
. -
lighter
Overloaded function for
lighter(int)
withf = 150
. -
assign
Overloaded function for
assign(io.qt.gui.QColor)
. -
assign
Overloaded function for
assign(io.qt.gui.QColor)
. -
equals
Overloaded function for
equals(io.qt.gui.QColor)
. -
equals
Overloaded function for
equals(io.qt.gui.QColor)
. -
equals
Overloaded function for
equals(io.qt.gui.QColor)
. -
setCmyk
Overloaded function for
setCmyk(int, int, int, int, int)
witha = 255
. -
setCmykF
Overloaded function for
setCmykF(double, double, double, double, double)
witha = 1.0
. -
setHsl
Overloaded function for
setHsl(int, int, int, int)
witha = 255
. -
setHslF
Overloaded function for
setHslF(double, double, double, double)
witha = 1.0
. -
setHsv
Overloaded function for
setHsv(int, int, int, int)
witha = 255
. -
setHsvF
Overloaded function for
setHsvF(double, double, double, double)
witha = 1.0
. -
setRgb
Overloaded function for
setRgb(int, int, int, int)
witha = 255
. -
setRgbF
Overloaded function for
setRgbF(double, double, double, double)
witha = 1.0
. -
fromCmyk
Overloaded function for
fromCmyk(int, int, int, int, int)
witha = 255
. -
fromCmykF
Overloaded function for
fromCmykF(double, double, double, double, double)
witha = 1.0
. -
fromHsl
Overloaded function for
fromHsl(int, int, int, int)
witha = 255
. -
fromHslF
Overloaded function for
fromHslF(double, double, double, double)
witha = 1.0
. -
fromHsv
Overloaded function for
fromHsv(int, int, int, int)
witha = 255
. -
fromHsvF
Overloaded function for
fromHsvF(double, double, double, double)
witha = 1.0
. -
fromRgb
Overloaded function for
fromRgb(int, int, int, int)
witha = 255
. -
fromRgbF
Overloaded function for
fromRgbF(double, double, double, double)
witha = 1.0
. -
fromRgba64
Overloaded function for
fromRgba64(short, short, short, short)
witha = 0xffff
.
-