@NotThreadSafe public class CSSHSL extends Object implements ICSSWriteable, ICSSVersionAware, ICSSColor, com.helger.commons.lang.ICloneable<CSSHSL>
| Constructor and Description |
|---|
CSSHSL(CSSHSL aOther)
Copy constructor
|
CSSHSL(float fHue,
float fSaturation,
float fLightness)
Constructor
|
CSSHSL(int nHue,
int nSaturation,
int nLightness)
Constructor
|
CSSHSL(String sHue,
String sSaturation,
String sLightness) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAsCSSString(ICSSWriterSettings aSettings,
int nIndentLevel)
Get the contents of this object as a serialized CSS string for writing to
an output.
|
CSSHSLA |
getAsHSLA(float fOpacity)
Convert this value to an HSLA value.
|
CSSHSLA |
getAsHSLA(String sOpacity)
Convert this value to an HSLA value.
|
String |
getAsString() |
CSSHSL |
getClone() |
String |
getHue() |
String |
getLightness() |
ECSSVersion |
getMinimumCSSVersion() |
String |
getSaturation() |
int |
hashCode() |
CSSHSL |
setHue(String sHue) |
CSSHSL |
setLightness(String sLightness) |
CSSHSL |
setSaturation(String sSaturation) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsCSSString, getAsCSSStringpublic CSSHSL(@Nonnull CSSHSL aOther)
aOther - The object to copy the data from. May not be null.public CSSHSL(int nHue,
int nSaturation,
int nLightness)
nHue - Hue value. Is scaled to the range 0-360nSaturation - Saturation value. Is cut to the range 0-100 (percentage)nLightness - Lightness value. Is cut to the range 0-100 (percentage)public CSSHSL(float fHue,
float fSaturation,
float fLightness)
fHue - Hue value. Is scaled to the range 0-360fSaturation - Saturation value. Is cut to the range 0-100 (percentage)fLightness - Lightness value. Is cut to the range 0-100 (percentage)@Nonnull public CSSHSLA getAsHSLA(float fOpacity)
fOpacity - Opacity part. Is fitted to a value between 0 and 1.null.@Nonnull public CSSHSLA getAsHSLA(@Nonnull @Nonempty String sOpacity)
sOpacity - Opacity part. May neither be null nor empty.null.@Nonnull @Nonempty public String getAsString()
getAsString in interface ICSSColor@Nonnull @Nonempty public String getAsCSSString(@Nonnull ICSSWriterSettings aSettings, @Nonnegative int nIndentLevel)
ICSSWriteablegetAsCSSString in interface ICSSWriteableaSettings - The settings to be used to format the output. May not be
null.nIndentLevel - The current indentation levelnull.@Nonnull public ECSSVersion getMinimumCSSVersion()
getMinimumCSSVersion in interface ICSSVersionAwarenull.@Nonnull public CSSHSL getClone()
getClone in interface com.helger.commons.lang.ICloneable<CSSHSL>Copyright © 2014–2018 Philip Helger. All rights reserved.