xmlgraphics-commons 1.4

org.apache.xmlgraphics.java2d.color
Class ColorUtil

java.lang.Object
  extended by org.apache.xmlgraphics.java2d.color.ColorUtil

public final class ColorUtil
extends java.lang.Object

Generic Color helper class.

This class supports parsing string values into color values and creating color values for strings. It provides a list of standard color names.


Method Summary
static boolean isGray(java.awt.Color col)
          Indicates whether the color is a gray value.
static java.awt.Color lightenColor(java.awt.Color col, float factor)
          Lightens up a color for groove, ridge, inset and outset border effects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lightenColor

public static java.awt.Color lightenColor(java.awt.Color col,
                                          float factor)
Lightens up a color for groove, ridge, inset and outset border effects.

Parameters:
col - the color to lighten up
factor - factor by which to lighten up (negative values darken the color)
Returns:
the modified color

isGray

public static boolean isGray(java.awt.Color col)
Indicates whether the color is a gray value.

Parameters:
col - the color
Returns:
true if it is a gray value

xmlgraphics-commons 1.4

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.