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