Class CSSRGBA

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

@NotThreadSafe public class CSSRGBA extends Object implements ICSSWriteable, ICSSColor, com.helger.commons.lang.ICloneable<CSSRGBA>
Represents a single RGBA color value (red, green, blue, opacity)
Author:
Philip Helger
  • Constructor Details

    • CSSRGBA

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

      public CSSRGBA(@Nonnull CSSRGB aOther, float fOpacity)
      Constructor
      Parameters:
      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.
      Since:
      3.8.3
    • CSSRGBA

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

      public CSSRGBA(int nRed, int nGreen, int nBlue, float fOpacity)
      Constructor
      Parameters:
      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.
    • CSSRGBA

      public CSSRGBA(@Nonnull @Nonempty String sRed, @Nonnull @Nonempty String sGreen, @Nonnull @Nonempty String sBlue, @Nonnull @Nonempty String sOpacity)
      Constructor
      Parameters:
      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.
  • Method Details