Class QColor
java.lang.Object
net.sourceforge.plantuml.quantization.QColor
An RGB representation of a color, which stores each component as a double in
the range [0, 1]. Values outside of [0, 1] are permitted though, as this is
convenient e.g. for representing color deltas.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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) getNearestColor
(Collection<QColor> colors) Find this color's nearest neighbor, based on Euclidean distance, among some set of colors.int
int
hashCode()
scaled
(double s) toString()
-
Field Details
-
BLACK
-
WHITE
-
RED
-
GREEN
-
BLUE
-
-
Constructor Details
-
QColor
public QColor(double red, double green, double blue)
-
-
Method Details
-
fromArgbInt
-
fromRgbInt
-
getCentroid
-
getComponent
public double getComponent(int index) -
scaled
-
plus
-
minus
-
getEuclideanDistanceTo
-
getNearestColor
Find this color's nearest neighbor, based on Euclidean distance, among some set of colors. -
getRgbInt
public int getRgbInt() -
equals
-
hashCode
public int hashCode() -
toString
-