Interface ARGBColor


public interface ARGBColor
Describes a color with Alpha, Red, Green and Blue components.
Since:
9.10.2
  • Method Summary

    Modifier and Type Method Description
    static ARGBColor create​(float r, float g, float b, float a)
    Creates an ARGBColor with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
    static ARGBColor create​(int r, int g, int b, int a)
    Creates an ARGBColor with the specified red, green, blue, and alpha values in the range (0 - 255).
    static ARGBColor create​(Color color)
    Creates an ARGBColor from the given Color.
    int getAlpha()
    Returns the opaqueness component value of the color as an integer in the range [0, 255].
    int getARGB()
    Returns a 32bit integer with the first 8 bits reserved for the Alpha value, the next 8 bits for the Red, the next for the Green and the last 8 bits for the blue value.
    int getBlue()
    Returns the blue component value of the color as an integer in the range [0, 255].
    float getFloatAlpha()
    Returns the opaqueness component value of the color as a floating point number in the range [0.0, 1.0].
    float getFloatBlue()
    Returns the blue component value of the color as a floating point number in the range [0.0, 1.0].
    float getFloatGreen()
    Returns the green component value of the color as a floating point number in the range [0.0, 1.0].
    float getFloatRed()
    Returns the red component value of the color as a floating point number in the range [0.0, 1.0].
    int getGreen()
    Returns the green component value of the color as an integer in the range [0, 255].
    int getRed()
    Returns the red component value of the color as an integer in the range [0, 255].
    long getUnsignedARGB()
    Returns a bitwise 32 bit integer representation of the color, similarly as in getARGB(), but the value is unsigned.
    boolean isHidden()
    Returns true if the color is fully transparent.
    boolean isOpaque()
    Returns true if color is fully opaque.
    boolean isTransparent()
    Returns true if the color is semi-transparent.
  • Method Details

    • create

      static ARGBColor create​(int r, int g, int b, int a)
      Creates an ARGBColor with the specified red, green, blue, and alpha values in the range (0 - 255).
      Parameters:
      r - the red component
      g - the green component
      b - the blue component
      a - the alpha component
      Returns:
      the new instance of ARGBColor
      Since:
      9.10.2
    • create

      static ARGBColor create​(float r, float g, float b, float a)
      Creates an ARGBColor with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
      Parameters:
      r - the red component
      g - the green component
      b - the blue component
      a - the alpha component
      Returns:
      the new instance of ARGBColor
      Since:
      9.10.2
    • create

      static ARGBColor create​(Color color)
      Creates an ARGBColor from the given Color.
      Parameters:
      color - the color
      Returns:
      the new instance of ARGBColor
      Since:
      9.10.2
    • getARGB

      int getARGB()
      Returns a 32bit integer with the first 8 bits reserved for the Alpha value, the next 8 bits for the Red, the next for the Green and the last 8 bits for the blue value.
      Returns:
      32 bit integer representation of the color
      Since:
      9.10.2
    • getUnsignedARGB

      long getUnsignedARGB()
      Returns a bitwise 32 bit integer representation of the color, similarly as in getARGB(), but the value is unsigned.
      Returns:
      unsigned integer representation of the color
      Since:
      9.10.2
    • isOpaque

      boolean isOpaque()
      Returns true if color is fully opaque.
      Returns:
      true if the color is fully opaque
      Since:
      9.10.2
    • isHidden

      boolean isHidden()
      Returns true if the color is fully transparent.
      Returns:
      true if the color is fully transparent
      Since:
      9.10.2
    • isTransparent

      boolean isTransparent()
      Returns true if the color is semi-transparent.
      Returns:
      true if the color is semi-transparent
      Since:
      9.10.2
    • getAlpha

      int getAlpha()
      Returns the opaqueness component value of the color as an integer in the range [0, 255].
      Returns:
      alpha component as an integer
      Since:
      9.10.2
    • getRed

      int getRed()
      Returns the red component value of the color as an integer in the range [0, 255].
      Returns:
      red component as an integer
      Since:
      9.10.2
    • getGreen

      int getGreen()
      Returns the green component value of the color as an integer in the range [0, 255].
      Returns:
      green component as an integer
      Since:
      9.10.2
    • getBlue

      int getBlue()
      Returns the blue component value of the color as an integer in the range [0, 255].
      Returns:
      blue component as an integer
      Since:
      9.10.2
    • getFloatRed

      float getFloatRed()
      Returns the red component value of the color as a floating point number in the range [0.0, 1.0].
      Returns:
      red component as a float
      Since:
      9.10.2
    • getFloatGreen

      float getFloatGreen()
      Returns the green component value of the color as a floating point number in the range [0.0, 1.0].
      Returns:
      green component as a float
      Since:
      9.10.2
    • getFloatBlue

      float getFloatBlue()
      Returns the blue component value of the color as a floating point number in the range [0.0, 1.0].
      Returns:
      blue component as a float
      Since:
      9.10.2
    • getFloatAlpha

      float getFloatAlpha()
      Returns the opaqueness component value of the color as a floating point number in the range [0.0, 1.0].
      Returns:
      alpha component as a float
      Since:
      9.10.2