Class CMYKColor

java.lang.Object
com.aspose.barcode.generation.CMYKColor

public class CMYKColor extends Object

Class for CMYK color. Null means CMYK is not used, default RGB color is in use.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
     
    float
     
    float
     
    float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CMYKColor(int c, int m, int y, int k)
    Initializes a new instance of the CMYKColor class from CMYK values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares if values of colors are the same
    int
    Hash code of CMYKColor

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • C

      public float C
    • M

      public float M
    • Y

      public float Y
    • K

      public float K
  • Constructor Details

    • CMYKColor

      public CMYKColor(int c, int m, int y, int k)

      Initializes a new instance of the CMYKColor class from CMYK values. CMYK values are 0-100.

      Parameters:
      c - Cyan value [0, 100]
      m - Magenta value [0, 100]
      y - Yellow value [0, 100]
      k - Black value [0, 100]
  • Method Details

    • equals

      public boolean equals(Object obj)

      Compares if values of colors are the same

      Overrides:
      equals in class Object
      Parameters:
      obj - CMYKColor to compare
      Returns:
      Are values the same
    • hashCode

      public int hashCode()

      Hash code of CMYKColor

      Overrides:
      hashCode in class Object
      Returns:
      Hash code of CMYKColor