Class Color


  • public class Color
    extends Object
    The Class Color.
    • Field Detail

      • WHITE

        public static final Color WHITE
        The Constant WHITE.
      • LIGHT_GRAY

        public static final Color LIGHT_GRAY
        The Constant LIGHT_GRAY.
      • GRAY

        public static final Color GRAY
        The Constant GRAY.
      • DARK_GRAY

        public static final Color DARK_GRAY
        The Constant DARK_GRAY.
      • BLACK

        public static final Color BLACK
        The Constant BLACK.
      • RED

        public static final Color RED
        The Constant RED.
      • PINK

        public static final Color PINK
        The Constant PINK.
      • ORANGE

        public static final Color ORANGE
        The Constant ORANGE.
      • YELLOW

        public static final Color YELLOW
        The Constant YELLOW.
      • GREEN

        public static final Color GREEN
        The Constant GREEN.
      • MAGENTA

        public static final Color MAGENTA
        The Constant MAGENTA.
      • CYAN

        public static final Color CYAN
        The Constant CYAN.
      • BLUE

        public static final Color BLUE
        The Constant BLUE.
    • Constructor Detail

      • Color

        public Color​(String hex)
        Instantiates a new color.
        Parameters:
        hex - the hex
      • Color

        public Color​(int r,
                     int g,
                     int b)
        Instantiates a new color.
        Parameters:
        r - the r
        g - the g
        b - the b
      • Color

        public Color​(float h,
                     float s,
                     float l)
        Instantiates a new color.
        Parameters:
        h - the h
        s - the s
        l - the l
    • Method Detail

      • getRed

        public int getRed()
        Gets the red.
        Returns:
        the red
      • getGreen

        public int getGreen()
        Gets the green.
        Returns:
        the green
      • getBlue

        public int getBlue()
        Gets the blue.
        Returns:
        the blue
      • getHue

        public float getHue()
        Gets the hue.
        Returns:
        the hue
      • getSaturation

        public float getSaturation()
        Gets the saturation.
        Returns:
        the saturation
      • getLightness

        public float getLightness()
        Gets the lightness.
        Returns:
        the lightness