ColorConverter
Overview
ColorConverter is a class in Aspose.PDF FOSS for Java.
Converts color operators in page content streams from one color space to another.
This class provides 4 methods for working with ColorConverter objects in Java programs.
Available methods include: cmykToRgb, convert, rgbToCmyk, rgbToGray.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Methods
| Signature | Description |
|---|---|
convert(document: Document, strategy: ColorConversionStrategy) | Converts all color operators in every page of the document according to the given strategy. |
rgbToGray(r: double, g: double, b: double) → double | Converts RGB to grayscale using luminance weights. |
rgbToCmyk(r: double, g: double, b: double) → double[] | Converts RGB to CMYK color values. |
cmykToRgb(c: double, m: double, y: double, k: double) → double[] | Converts CMYK to RGB color values. |