Package io.sf.carte.doc.style.css
Interface CSSColor
public interface CSSColor
A color.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone this color.getAlpha()
Get the alpha channel of this color.Get the color model that this color uses.Get the color space to which this color belongs.int
The number of component values plus the alpha channel.item
(int index) Get the component of this color located atindex
.Gives a minified string representation of this color.
-
Method Details
-
getColorModel
CSSColorValue.ColorModel getColorModel()Get the color model that this color uses.If this methods returns the
PROFILE
value, this color belongs to a custom profile.- Returns:
- the color model.
-
getColorSpace
String getColorSpace()Get the color space to which this color belongs.- Returns:
- the color space.
-
getAlpha
CSSPrimitiveValue getAlpha()Get the alpha channel of this color.- Returns:
- the alpha channel.
-
item
Get the component of this color located atindex
.The alpha channel is considered the component
0
, so the actual color component index starts at1
.- Parameters:
index
- the index.0
is always the alpha channel.- Returns:
- the component, or
null
if the index is out of range.
-
getLength
int getLength()The number of component values plus the alpha channel.- Returns:
- the number of component values plus the alpha channel.
-
toMinifiedString
String toMinifiedString()Gives a minified string representation of this color.- Returns:
- a minified serialization.
-
clone
CSSColor clone()Clone this color.- Returns:
- a clone of this color.
-