Class GrayScaleColorConverter
- java.lang.Object
-
- org.apache.xmlgraphics.java2d.color.GrayScaleColorConverter
-
- All Implemented Interfaces:
ColorConverter
public final class GrayScaleColorConverter extends Object implements ColorConverter
Converts to grayscale using the standard RED=30%, GREEN=59% and BLUE=11% weights (see http://en.wikipedia.org/wiki/Grayscale)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Colorconvert(Color color)The color is converted to CMYK with just the K component.static GrayScaleColorConvertergetInstance()Returns a singleton instance.
-
-
-
Method Detail
-
getInstance
public static GrayScaleColorConverter getInstance()
Returns a singleton instance.- Returns:
- singleton instance of GrayScaleColorConverter
-
convert
public Color convert(Color color)
The color is converted to CMYK with just the K component.- Specified by:
convertin interfaceColorConverter- Parameters:
color- to convert- Returns:
- converted color
-
-