Class Color
java.lang.Object
org.strassburger.colorlab4j.color.Color
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoAnsi()Get the ANSI representation of the colorGet the ANSI representation of the color for the backgroundabstract StringGet the CSS representation of the colortoHex()Get the hex representation of the colorabstract HSLColortoHSL()Convert the color to HSLabstract HSVColortoHSV()Convert the color to HSVabstract LABColortoLAB()Convert the color to LABabstract RGBColortoRGB()Convert the color to RGBabstract XYZColortoXYZ()Convert the color to XYZ
-
Constructor Details
-
Color
public Color()
-
-
Method Details
-
toRGB
Convert the color to RGB- Returns:
- RGB representation of the color
-
toHSL
Convert the color to HSL- Returns:
- HSL representation of the color
-
toHSV
Convert the color to HSV- Returns:
- HSV representation of the color
-
toLAB
Convert the color to LAB- Returns:
- LAB representation of the color
-
toXYZ
Convert the color to XYZ- Returns:
- XYZ representation of the color
-
toHex
Get the hex representation of the color- Returns:
- Hex representation of the color (e.g. "#ff0000")
-
toAnsi
Get the ANSI representation of the color- Returns:
- ANSI representation of the color
-
toAnsiBackground
Get the ANSI representation of the color for the background- Returns:
- ANSI representation of the color for the background
-
toCssString
Get the CSS representation of the color- Returns:
- CSS representation of the color
-