Class Grayscale

  • All Implemented Interfaces:
    Color

    public class Grayscale
    extends java.lang.Object
    implements Color
    • Field Detail

      • gray

        public final int gray
      • alpha

        public final int alpha
    • Constructor Detail

      • Grayscale

        public Grayscale​(int gray)
      • Grayscale

        public Grayscale​(int gray,
                         int alpha)
    • Method Detail

      • toRGB

        public RGBColor toRGB()
        Description copied from interface: Color
        Returns a conversion of this Color into an RGBColor. If this colour is already an instance of RGBColor then the same instance will be returned.
        Specified by:
        toRGB in interface Color
      • equals

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

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