Class Color


  • public class Color
    extends java.lang.Object
    Represents a color in RGBA space.

    Since 3.6.0

    • Constructor Summary

      Constructors 
      Constructor Description
      Color()  
      Color​(double red, double green, double blue, double alpha)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      double getAlpha()
      The alpha component of this color in the range [0-1].
      double getBlue()
      The blue component of this color in the range [0-1].
      double getGreen()
      The green component of this color in the range [0-1].
      double getRed()
      The red component of this color in the range [0-1].
      int hashCode()  
      void setAlpha​(double alpha)
      The alpha component of this color in the range [0-1].
      void setBlue​(double blue)
      The blue component of this color in the range [0-1].
      void setGreen​(double green)
      The green component of this color in the range [0-1].
      void setRed​(double red)
      The red component of this color in the range [0-1].
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Color

        public Color()
      • Color

        public Color​(double red,
                     double green,
                     double blue,
                     double alpha)
    • Method Detail

      • getRed

        public double getRed()
        The red component of this color in the range [0-1].
      • setRed

        public void setRed​(double red)
        The red component of this color in the range [0-1].
      • getGreen

        public double getGreen()
        The green component of this color in the range [0-1].
      • setGreen

        public void setGreen​(double green)
        The green component of this color in the range [0-1].
      • getBlue

        public double getBlue()
        The blue component of this color in the range [0-1].
      • setBlue

        public void setBlue​(double blue)
        The blue component of this color in the range [0-1].
      • getAlpha

        public double getAlpha()
        The alpha component of this color in the range [0-1].
      • setAlpha

        public void setAlpha​(double alpha)
        The alpha component of this color in the range [0-1].
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object