Class ColorCmy


  • public final class ColorCmy
    extends java.lang.Object
    Represents a color in the CMY color space.

    Contains the constant values for black, white, red, green, blue, cyan, magenta, and yellow.

    Since:
    1.0-alpha1
    See Also:
    https://en.wikipedia.org/wiki/CMY_color_model
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorCmy​(double c, double m, double y)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • CYAN

        public static final ColorCmy CYAN
        A constant for color cyan. Color components are:
             cyan:    100
             magenta: 0
             yellow:  0
         
      • MAGENTA

        public static final ColorCmy MAGENTA
        A constant for color magenta. Color components are:
             cyan:    0
             magenta: 100
             yellow:  0
         
      • YELLOW

        public static final ColorCmy YELLOW
        A constant for color yellow. Color components are:
             cyan:    0
             magenta: 0
             yellow:  100
         
      • BLACK

        public static final ColorCmy BLACK
        A constant for color black. Color components are:
             cyan:    100
             magenta: 100
             yellow:  100
         
      • WHITE

        public static final ColorCmy WHITE
        A constant for color white. Color components are:
             cyan:    0
             magenta: 0
             yellow:  0
         
      • RED

        public static final ColorCmy RED
        A constant for color red. Color components are:
             cyan:    0
             magenta: 100
             yellow:  100
         
      • GREEN

        public static final ColorCmy GREEN
        A constant for color green. Color components are:
             cyan:    100
             magenta: 0
             yellow:  100
         
      • BLUE

        public static final ColorCmy BLUE
        A constant for color blue. Color components are:
             cyan:    100
             magenta: 100
             yellow:  0
         
      • c

        public final double c
        Cyan.
      • m

        public final double m
        Magenta.
      • y

        public final double y
        Yellow.
    • Constructor Detail

      • ColorCmy

        public ColorCmy​(double c,
                        double m,
                        double y)
        Constructs a new instance.
        Parameters:
        c - cyan.
        m - magenta.
        y - yellow.
    • Method Detail

      • 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
      • toString

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