Package de.xima.fc.color
Class RgbTriplet
- java.lang.Object
-
- de.xima.fc.color.RgbTriplet
-
- All Implemented Interfaces:
Serializable
public final class RgbTriplet extends Object implements Serializable
Represents an RGB color triplet.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getBlueInt()
double
getBlueNorm()
int
getGreenInt()
double
getGreenNorm()
String
getHex()
int
getRedInt()
double
getRedNorm()
int
getRgb()
int
hashCode()
static RgbTriplet
of(double[] components)
static RgbTriplet
of(double red, double green, double blue)
static RgbTriplet
of(long rgb)
static RgbTriplet
of(long red, long green, long blue)
static RgbTriplet
of(String hexString)
static RgbTriplet
of(String hexString, RgbTriplet defaultValue)
RgbTriplet
scaled(double scaleRed, double scaleGreen, double scaleBlue)
CssColor
toCssColor()
HslUvTriplet
toHslUvTriplet()
HsvTriplet
toHsvTriplet()
String
toString()
-
-
-
Method Detail
-
getBlueInt
public int getBlueInt()
-
getBlueNorm
public double getBlueNorm()
-
getGreenInt
public int getGreenInt()
-
getGreenNorm
public double getGreenNorm()
-
getHex
public String getHex()
-
getRedInt
public int getRedInt()
-
getRedNorm
public double getRedNorm()
-
getRgb
public int getRgb()
-
scaled
public RgbTriplet scaled(double scaleRed, double scaleGreen, double scaleBlue)
- Parameters:
scaleRed
- Scale for the red value.scaleGreen
- Scale for the green value.scaleBlue
- Scale for the blue value.- Returns:
- Scales all components by the given factors.
-
toCssColor
public CssColor toCssColor()
-
toHslUvTriplet
public HslUvTriplet toHslUvTriplet()
-
toHsvTriplet
public HsvTriplet toHsvTriplet()
-
of
public static RgbTriplet of(double red, double green, double blue)
-
of
public static RgbTriplet of(double[] components)
-
of
public static RgbTriplet of(long rgb)
-
of
public static RgbTriplet of(long red, long green, long blue)
-
of
public static RgbTriplet of(String hexString)
-
of
public static RgbTriplet of(String hexString, RgbTriplet defaultValue)
-
-