@NotThreadSafe public class CSSRGB extends Object implements ICSSWriteable, ICSSColor, com.helger.commons.lang.ICloneable<CSSRGB>
| Constructor and Description |
|---|
CSSRGB(CSSRGB aOther)
Copy constructor
|
CSSRGB(int nRed,
int nGreen,
int nBlue)
Constructor
|
CSSRGB(String sRed,
String sGreen,
String sBlue)
Constructor
|
| 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.
|
CSSRGBA |
getAsRGBA(float fOpacity)
Convert this value to an RGBA value.
|
CSSRGBA |
getAsRGBA(String sOpacity)
Convert this value to an RGBA value.
|
String |
getAsString() |
String |
getBlue() |
CSSRGB |
getClone() |
String |
getGreen() |
String |
getRed() |
int |
hashCode() |
CSSRGB |
setBlue(String sBlue) |
CSSRGB |
setGreen(String sGreen) |
CSSRGB |
setRed(String sRed) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsCSSString, getAsCSSStringpublic CSSRGB(@Nonnull CSSRGB aOther)
aOther - The object to copy the data from. May not be null.public CSSRGB(int nRed,
int nGreen,
int nBlue)
nRed - Red part. Is fitted to a value between 0 and 255.nGreen - Green part. Is fitted to a value between 0 and 255.nBlue - Blue part. Is fitted to a value between 0 and 255.@Nonnull public CSSRGBA getAsRGBA(float fOpacity)
fOpacity - Opacity part. Is fitted to a value between 0 and 1.null.@Nonnull public CSSRGBA getAsRGBA(@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 CSSRGB getClone()
getClone in interface com.helger.commons.lang.ICloneable<CSSRGB>Copyright © 2014–2018 Philip Helger. All rights reserved.