Class CSSHSLA

java.lang.Object
com.helger.css.decl.CSSHSLA
All Implemented Interfaces:
com.helger.commons.lang.ICloneable<CSSHSLA>, ICSSColor, ICSSVersionAware, ICSSWriteable

@NotThreadSafe public class CSSHSLA extends Object implements ICSSWriteable, ICSSVersionAware, ICSSColor, com.helger.commons.lang.ICloneable<CSSHSLA>
Represents a single HSLA color value (hue, saturation, lightness, opacity).
Author:
Philip Helger
  • Constructor Details

    • CSSHSLA

      public CSSHSLA(@Nonnull CSSHSLA aOther)
      Copy constructor
      Parameters:
      aOther - The object to copy the data from. May not be null.
    • CSSHSLA

      public CSSHSLA(@Nonnull CSSHSL aOther, float fOpacity)
      Constructor
      Parameters:
      aOther - The HSL value to use as the basis. May not be null.
      fOpacity - Opacity part. Is fitted to a value between 0 and 1.
      Since:
      3.8.3
    • CSSHSLA

      public CSSHSLA(@Nonnull CSSHSL aOther, @Nonnull @Nonempty String sOpacity)
      Constructor
      Parameters:
      aOther - The HSL value to use as the basis. May not be null.
      sOpacity - Opacity part. May neither be null nor empty.
      Since:
      3.8.3
    • CSSHSLA

      public CSSHSLA(int nHue, int nSaturation, int nLightness, float fOpacity)
      Constructor
      Parameters:
      nHue - Hue value. Is scaled to the range 0-360
      nSaturation - Saturation value. Is cut to the range 0-100 (percentage)
      nLightness - Lightness value. Is cut to the range 0-100 (percentage)
      fOpacity - Opacity - is scaled to 0-1
    • CSSHSLA

      public CSSHSLA(float fHue, float fSaturation, float fLightness, float fOpacity)
      Constructor
      Parameters:
      fHue - Hue value. Is scaled to the range 0-360
      fSaturation - Saturation value. Is cut to the range 0-100 (percentage)
      fLightness - Lightness value. Is cut to the range 0-100 (percentage)
      fOpacity - Opacity - is scaled to 0-1
    • CSSHSLA

      public CSSHSLA(@Nonnull @Nonempty String sHue, @Nonnull @Nonempty String sSaturation, @Nonnull @Nonempty String sLightness, @Nonnull @Nonempty String sOpacity)
  • Method Details