Class RgbTriplet
java.lang.Object
de.xima.fc.color.RgbTriplet
- All Implemented Interfaces:
IOpaqueRgbHexColorProviding, Serializable
Represents an RGB color triplet.
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanintdoubleintdoublegetHex()intGets the opaque color as a hex RGB value, e.g. 0x#FF0000 for red.intdoubleintgetRgb()inthashCode()static RgbTripletof(double[] components) static RgbTripletof(double red, double green, double blue) static RgbTripletof(long rgb) static RgbTripletof(long red, long green, long blue) static RgbTripletstatic RgbTripletof(String hexString, RgbTriplet defaultValue) scaled(double scaleRed, double scaleGreen, double scaleBlue) Converts this RGB triplet to an RGBA quadruplet with alpha = 1 (opaque).toString()
-
Method Details
-
equals
-
getBlueInt
public int getBlueInt() -
getBlueNorm
public double getBlueNorm() -
getGreenInt
public int getGreenInt() -
getGreenNorm
public double getGreenNorm() -
getHex
-
getOpaqueRgbHexColor
public int getOpaqueRgbHexColor()Description copied from interface:IOpaqueRgbHexColorProvidingGets the opaque color as a hex RGB value, e.g. 0x#FF0000 for red.- Specified by:
getOpaqueRgbHexColorin interfaceIOpaqueRgbHexColorProviding- Returns:
- The hex RGB value of the color.
-
getRedInt
public int getRedInt() -
getRedNorm
public double getRedNorm() -
getRgb
public int getRgb() -
hashCode
-
scaled
- 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
-
toHslUvTriplet
-
toHsvTriplet
-
toRgbaQuadruple
Converts this RGB triplet to an RGBA quadruplet with alpha = 1 (opaque).- Returns:
- The RGBA quadruplet.
-
toString
-
of
-
of
-
of
-
of
-
of
-
of
-