public final class QColor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static QColor |
BLACK |
static QColor |
BLUE |
static QColor |
GREEN |
static QColor |
RED |
static QColor |
WHITE |
Constructor and Description |
---|
QColor(double red,
double green,
double blue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static QColor |
fromArgbInt(ColorMapper mapper,
int rgb) |
static QColor |
fromRgbInt(int rgb) |
static QColor |
getCentroid(Multiset<QColor> colors) |
double |
getComponent(int index) |
double |
getEuclideanDistanceTo(QColor that) |
QColor |
getNearestColor(java.util.Collection<QColor> colors)
Find this color's nearest neighbor, based on Euclidean distance, among some
set of colors.
|
int |
getRgbInt() |
int |
hashCode() |
QColor |
minus(QColor that) |
QColor |
plus(QColor that) |
QColor |
scaled(double s) |
java.lang.String |
toString() |
public static final QColor BLACK
public static final QColor WHITE
public static final QColor RED
public static final QColor GREEN
public static final QColor BLUE
public static QColor fromArgbInt(ColorMapper mapper, int rgb)
public static QColor fromRgbInt(int rgb)
public double getComponent(int index)
public QColor scaled(double s)
public double getEuclideanDistanceTo(QColor that)
public QColor getNearestColor(java.util.Collection<QColor> colors)
public int getRgbInt()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object