Package com.pd4ml.pdf.xfdf.internal
Class ColorUtil
- java.lang.Object
-
- com.pd4ml.pdf.xfdf.internal.ColorUtil
-
public final class ColorUtil extends java.lang.ObjectConverts between a PDF colour array (/C//IC: 0, 1, 3 or 4 numeric components -- ISO 32000-1 Table 164/170) and the"#RRGGBB"hex string XFDF'scolor/interior-colorattributes use.A 4-component (CMYK) source is converted to its nearest RGB equivalent for display in the hex form -- lossy, but XFDF has no CMYK colour syntax at all, so there's no alternative that stays within the format. A 0-component array (explicitly "no colour", e.g. a transparent annotation border) has no XFDF representation either and is treated the same as a missing/
nullarray: nocolorattribute is written.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static COSArraytoColorArray(java.lang.String hex)nullifhexisn't a well-formed"#RRGGBB"string.static java.lang.StringtoHex(COSArray color)nullifcolorisnull, empty, or not a numeric-component array of length 1, 3 or 4.
-