Class Color

  • All Implemented Interfaces:
    IsColor

    public final class Color
    extends Object
    implements IsColor
    This class contains information about a color.
    You can requests a specific alpha (starting form source color and cloning it).
    Author:
    Andrea "Stock" Stocchero
    • Field Detail

      • DEFAULT_ALPHA

        public static final double DEFAULT_ALPHA
        Default transparency is 1.0, (no transparency).
        See Also:
        Constant Field Values
      • CHARBA

        public static final Color CHARBA
        Main color linked to CHARBA, #f27173.
    • Constructor Detail

      • Color

        public Color​(int r,
                     int g,
                     int b)
        Creates the color with RGB values.
        Parameters:
        r - red value
        g - green value
        b - blue value
    • Method Detail

      • getRed

        public int getRed()
        Description copied from interface: IsColor
        Returns the red value.
        Specified by:
        getRed in interface IsColor
        Returns:
        the red
      • getGreen

        public int getGreen()
        Description copied from interface: IsColor
        Returns the green value.
        Specified by:
        getGreen in interface IsColor
        Returns:
        the green
      • getBlue

        public int getBlue()
        Description copied from interface: IsColor
        Returns the blue value.
        Specified by:
        getBlue in interface IsColor
        Returns:
        the blue
      • getAlpha

        public double getAlpha()
        Description copied from interface: IsColor
        Returns the alpha rate.
        Specified by:
        getAlpha in interface IsColor
        Returns:
        the alpha