com.atlassian.greenhopper.util
Class ColorUtils

java.lang.Object
  extended by com.atlassian.greenhopper.util.ColorUtils

public class ColorUtils
extends java.lang.Object

Color utilities


Constructor Summary
ColorUtils()
           
 
Method Summary
static java.lang.String colorToHex(java.awt.Color color)
          Returns the hex string of a color
static java.awt.Color hexToColor(java.lang.String hex)
          Converts a hex to a color
static java.awt.Color hexToColor(java.lang.String hex, java.awt.Color fallback)
          Convert a hex to a Color
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorUtils

public ColorUtils()
Method Detail

colorToHex

public static java.lang.String colorToHex(java.awt.Color color)
Returns the hex string of a color


hexToColor

public static java.awt.Color hexToColor(java.lang.String hex)
Converts a hex to a color

Returns:
the Color or null in case hex couldn't be parsed

hexToColor

public static java.awt.Color hexToColor(java.lang.String hex,
                                        java.awt.Color fallback)
Convert a hex to a Color

Returns:
the Color described by hex or fallback in case of errors (null, wrong format, etc)


Copyright © 2007-2013 Atlassian. All Rights Reserved.