Interface Color

    • Method Detail

      • toRGB

        RGBColor toRGB()
        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.
      • toCMYK

        default CMYKColor toCMYK()
        Returns a conversion of this color into a CYMK color. If this colour is already a CYMK then the same instance will be returned.
      • toGrayscale

        default Grayscale toGrayscale()
      • toHex

        default java.lang.String toHex()
        Returns a HEX String of this colour. Eg for 0,255,0, this method will return 00FF00.
      • awt

        default java.awt.Color awt()
      • toAWT

        default java.awt.Color toAWT()
        Returns this instance as a java.awt.Color. AWT Colors use the RGB color model.
      • toPixel

        default Pixel toPixel​(int x,
                              int y)
      • average

        default RGBColor average​(Color other)
        Returns the average of this Color merged with another Color. Takes into account alpha and returns the average as an RGB value.

        See https://stackoverflow.com/questions/1944095/how-to-mix-two-argb-pixels

      • paint

        default java.awt.Paint paint()
        Returns this colour as an AWT Paint.