Class DeviceCmyk

java.lang.Object
com.itextpdf.kernel.colors.Color
com.itextpdf.kernel.colors.DeviceCmyk

public class DeviceCmyk extends Color
Color space to specify colors according to CMYK color model.
  • Field Details

    • CYAN

      public static final DeviceCmyk CYAN
      Predefined cyan DeviceCmyk color
    • MAGENTA

      public static final DeviceCmyk MAGENTA
      Predefined magenta DeviceCmyk color
    • YELLOW

      public static final DeviceCmyk YELLOW
      Predefined yellow DeviceCmyk color
    • BLACK

      public static final DeviceCmyk BLACK
      Predefined black DeviceCmyk color
  • Constructor Details

    • DeviceCmyk

      public DeviceCmyk()
      Creates DeviceCmyk color with all colorants intensities initialised as zeroes.
    • DeviceCmyk

      public DeviceCmyk (int c, int m, int y, int k)
      Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants. The intensities are considered to be in [0, 100] gap, if not, the intensity will be considered as 100 (when colorant's value is bigger than 100) or 0 (when colorant's value is less than 0).
      Parameters:
      c - the intensity of cyan colorant
      m - the intensity of magenta colorant
      y - the intensity of yellow colorant
      k - the intensity of black colorant
    • DeviceCmyk

      public DeviceCmyk (float c, float m, float y, float k)
      Creates DeviceCmyk color by intensities of cyan, magenta, yellow and black colorants. The intensities are considered to be in [0, 1] interval, if not, the intensity will be considered as 1 (when colorant's value is bigger than 1) or 0 (when colorant's value is less than 0).
      Parameters:
      c - the intensity of cyan colorant
      m - the intensity of magenta colorant
      y - the intensity of yellow colorant
      k - the intensity of black colorant
  • Method Details

    • makeLighter

      public static DeviceCmyk makeLighter (DeviceCmyk cmykColor)
      Returns DeviceCmyk color which is lighter than given one
      Parameters:
      cmykColor - the DeviceCmyk color to be made lighter
      Returns:
      lighter color
    • makeDarker

      public static DeviceCmyk makeDarker (DeviceCmyk cmykColor)
      Returns DeviceCmyk color which is darker than given one
      Parameters:
      cmykColor - the DeviceCmyk color to be made darker
      Returns:
      darker color