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 TypeMethodDescriptionbooleanstatic QColorfromArgbInt(ColorMapper mapper, int rgb) static QColorfromRgbInt(int rgb) static QColorgetCentroid(Multiset<QColor> colors) doublegetComponent(int index) doublegetEuclideanDistanceTo(QColor that) getNearestColor(Collection<QColor> colors) Find this color's nearest neighbor, based on Euclidean distance, among some set of colors.intinthashCode()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
-