Interface CSSColor

All Known Subinterfaces:
HSLColor, HWBColor, LABColor, LCHColor, RGBAColor, XYZColor

public interface CSSColor
A 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.

      the color model.
    • getColorSpace

      String getColorSpace()
      Get the color space to which this color belongs.
      the color space.
    • getAlpha

      CSSPrimitiveValue getAlpha()
      Get the alpha channel of this color.
      the alpha channel.
    • item

      CSSPrimitiveValue item(int index)
      Get the component of this color located at index.

      The alpha channel is considered the component 0, so the actual color component index starts at 1.

      index - the index. 0 is always the alpha channel.
      the component, or null if the index is out of range.
    • getLength

      int getLength()
      The number of component values plus the alpha channel.
      the number of component values plus the alpha channel.
    • toMinifiedString

      String toMinifiedString()
      Gives a minified string representation of this color.
      a minified serialization.
    • clone

      CSSColor clone()
      Clone this color.
      a clone of this color.