Class Color


  • public class Color
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Color()
      Default constructor.
      Color​(int color)  
      Color​(int alpha, int red, int green, int blue)
      Constructor
    • Constructor Detail

      • Color

        public Color​(int alpha,
                     int red,
                     int green,
                     int blue)
        Constructor
        Parameters:
        alpha - Alpha value(0-255)
        red - Red color value (0-255)
        green - Green color value (0-255)
        blue - Blue color value (0-255)
      • Color

        public Color()
        Default constructor. RGB value is initialized to 0,0,0 (black).
      • Color

        public Color​(int color)
    • Method Detail

      • getAlpha

        public int getAlpha()
        Returns:
        the alpha channel value of the ARGB color space
      • getRed

        public int getRed()
        Returns:
        the red color value of the RGB value
      • getGreen

        public int getGreen()
        Returns:
        the green color value of the RGB value
      • getBlue

        public int getBlue()
        Returns:
        the blue color value of the RGB value