com.tecnick.htmlutils.htmlcolors
Class HTMLColors

java.lang.Object
  extended by com.tecnick.htmlutils.htmlcolors.HTMLColors

public class HTMLColors
extends java.lang.Object

Collection of static methods to handle HTML colors.

Copyright (c) 2004-2005 Tecnick.com S.r.l (www.tecnick.com) Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY www.tecnick.com - info@tecnick.com
Project homepage: http://htmlcolors.sourceforge.net
License: http://www.gnu.org/copyleft/lesser.html LGPL

Version:
1.0.002
Author:
Nicola Asuni [www.tecnick.com].

Constructor Summary
HTMLColors()
          Void Constructor.
 
Method Summary
static java.awt.Color getColorObject(java.lang.String c)
          Convert HTML color (#RRGGBB) to Color object.
static java.lang.String getHTMLColor(java.awt.Color c)
          Convert Color object to HTML string rapresentation (#RRGGBB).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLColors

public HTMLColors()
Void Constructor.

Method Detail

getHTMLColor

public static java.lang.String getHTMLColor(java.awt.Color c)
Convert Color object to HTML string rapresentation (#RRGGBB).

Parameters:
c - color to convert
Returns:
html string rapresentation (#RRGGBB)

getColorObject

public static java.awt.Color getColorObject(java.lang.String c)
Convert HTML color (#RRGGBB) to Color object.

Parameters:
c - HTML color string to convert (#RRGGBB)
Returns:
Color object or null in case of error