- All Implemented Interfaces:
QtObjectInterface
,Cloneable
public class QColor extends QtObject implements Cloneable
Colors based on RGB, HSV or CMYK values
Java wrapper for Qt class QColor
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QColor.NameFormat
Java wrapper for Qt enum QColor::NameFormatstatic class
QColor.Spec
Java wrapper for Qt enum QColor::Spec -
Constructor Summary
Constructors Modifier Constructor Description QColor()
See QColor::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 color)
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)
QColor(QRgba64 rgba64)
protected
QColor(QtObject.QPrivateConstructor p)
Constructor for internal use only.QColor(String name)
-
Method Summary
Modifier and Type Method Description int
alpha()
double
alphaF()
int
black()
double
blackF()
int
blue()
double
blueF()
QColor
clone()
static QStringList
colorNames()
QColor
convertTo(QColor.Spec colorSpec)
int
cyan()
double
cyanF()
QColor
darker()
Overloaded function fordarker(int)
withf = 200
.QColor
darker(int f)
boolean
equals(Object other)
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.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)
int
green()
double
greenF()
int
hashCode()
int
hslHue()
double
hslHueF()
int
hslSaturation()
double
hslSaturationF()
int
hsvHue()
double
hsvHueF()
int
hsvSaturation()
double
hsvSaturationF()
int
hue()
double
hueF()
boolean
isValid()
static boolean
isValidColor(String name)
QColor
lighter()
Overloaded function forlighter(int)
withf = 150
.QColor
lighter(int f)
int
lightness()
double
lightnessF()
int
magenta()
double
magentaF()
String
name()
String
name(QColor.NameFormat format)
void
readFrom(QDataStream arg__1)
int
red()
double
redF()
int
rgb()
int
rgba()
QRgba64
rgba64()
int
saturation()
double
saturationF()
void
setAlpha(int alpha)
void
setAlphaF(double alpha)
void
setBlue(int blue)
void
setBlueF(double blue)
void
setCmyk(int c, int m, int y, int k)
Overloaded function forsetCmyk(int, int, int, int, int)
witha = 255
.void
setCmyk(int c, int m, int y, int k, int a)
void
setCmykF(double c, double m, double y, double k)
Overloaded function forsetCmykF(double, double, double, double, double)
witha = 1.0
.void
setCmykF(double c, double m, double y, double k, double a)
void
setGreen(int green)
void
setGreenF(double green)
void
setHsl(int h, int s, int l)
Overloaded function forsetHsl(int, int, int, int)
witha = 255
.void
setHsl(int h, int s, int l, int a)
void
setHslF(double h, double s, double l)
Overloaded function forsetHslF(double, double, double, double)
witha = 1.0
.void
setHslF(double h, double s, double l, double a)
void
setHsv(int h, int s, int v)
Overloaded function forsetHsv(int, int, int, int)
witha = 255
.void
setHsv(int h, int s, int v, int a)
void
setHsvF(double h, double s, double v)
Overloaded function forsetHsvF(double, double, double, double)
witha = 1.0
.void
setHsvF(double h, double s, double v, double a)
void
setNamedColor(String name)
void
setRed(int red)
void
setRedF(double red)
void
setRgb(int rgb)
void
setRgb(int r, int g, int b)
Overloaded function forsetRgb(int, int, int, int)
witha = 255
.void
setRgb(int r, int g, int b, int a)
void
setRgba(int rgba)
void
setRgba64(QRgba64 rgba)
void
setRgbF(double r, double g, double b)
Overloaded function forsetRgbF(double, double, double, double)
witha = 1.0
.void
setRgbF(double r, double g, double b, double a)
QColor.Spec
spec()
QColor
toCmyk()
QColor
toExtendedRgb()
QColor
toHsl()
QColor
toHsv()
QColor
toRgb()
String
toString()
int
value()
double
valueF()
void
writeTo(QDataStream arg__1)
int
yellow()
double
yellowF()
-
Constructor Details
-
QColor
public QColor()See QColor::QColor()
-
QColor
Overloaded constructor for
QColor(io.qt.gui.QColor.Spec, short, short, short, short, short)
witha5 = 0
. -
QColor
-
QColor
-
QColor
-
QColor
-
QColor
-
QColor
public QColor(int r, int g, int b)Overloaded constructor for
QColor(int, int, int, int)
witha = 255
. -
QColor
public QColor(int r, int g, int b, int a) -
QColor
public QColor(int rgb) -
QColor
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
alpha
-
alphaF
-
black
-
blackF
-
blue
-
blueF
-
convertTo
-
cyan
-
cyanF
-
darker
Overloaded function for
darker(int)
withf = 200
. -
darker
-
green
-
greenF
-
hslHue
-
hslHueF
-
hslSaturation
-
hslSaturationF
-
hsvHue
-
hsvHueF
-
hsvSaturation
-
hsvSaturationF
-
hue
-
hueF
-
isValid
-
lighter
Overloaded function for
lighter(int)
withf = 150
. -
lighter
-
lightness
-
lightnessF
-
magenta
-
magentaF
-
name
-
name
-
writeTo
-
readFrom
-
red
-
redF
-
rgb
-
rgba
-
rgba64
-
saturation
-
saturationF
-
setAlpha
-
setAlphaF
-
setBlue
-
setBlueF
-
setCmyk
Overloaded function for
setCmyk(int, int, int, int, int)
witha = 255
. -
setCmyk
-
setCmykF
Overloaded function for
setCmykF(double, double, double, double, double)
witha = 1.0
. -
setCmykF
-
setGreen
-
setGreenF
-
setHsl
Overloaded function for
setHsl(int, int, int, int)
witha = 255
. -
setHsl
-
setHslF
Overloaded function for
setHslF(double, double, double, double)
witha = 1.0
. -
setHslF
-
setHsv
Overloaded function for
setHsv(int, int, int, int)
witha = 255
. -
setHsv
-
setHsvF
Overloaded function for
setHsvF(double, double, double, double)
witha = 1.0
. -
setHsvF
-
setNamedColor
-
setRed
-
setRedF
-
setRgb
Overloaded function for
setRgb(int, int, int, int)
witha = 255
. -
setRgb
-
setRgb
-
setRgbF
Overloaded function for
setRgbF(double, double, double, double)
witha = 1.0
. -
setRgbF
-
setRgba
-
setRgba64
-
spec
-
toCmyk
-
toExtendedRgb
-
toHsl
-
toHsv
-
toRgb
-
value
-
valueF
-
yellow
-
yellowF
-
colorNames
-
fromCmyk
Overloaded function for
fromCmyk(int, int, int, int, int)
witha = 255
. -
fromCmyk
-
fromCmykF
Overloaded function for
fromCmykF(double, double, double, double, double)
witha = 1.0
. -
fromCmykF
-
fromHsl
Overloaded function for
fromHsl(int, int, int, int)
witha = 255
. -
fromHsl
-
fromHslF
Overloaded function for
fromHslF(double, double, double, double)
witha = 1.0
. -
fromHslF
-
fromHsv
Overloaded function for
fromHsv(int, int, int, int)
witha = 255
. -
fromHsv
-
fromHsvF
Overloaded function for
fromHsvF(double, double, double, double)
witha = 1.0
. -
fromHsvF
-
fromRgb
Overloaded function for
fromRgb(int, int, int, int)
witha = 255
. -
fromRgb
-
fromRgb
-
fromRgbF
Overloaded function for
fromRgbF(double, double, double, double)
witha = 1.0
. -
fromRgbF
-
fromRgba
-
fromRgba64
-
fromRgba64
Overloaded function for
fromRgba64(short, short, short, short)
witha = 0xffff
. -
fromRgba64
-
isValidColor
-
equals
Description copied from class:QtObject
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface. Otherwise it will return the result of calling the super class implementation. -
hashCode
-
toString
-
clone
-