cytoscape.util
Class ColorUtil
java.lang.Object
cytoscape.util.ColorUtil
public class ColorUtil
- extends Object
Color utility class to convert Java color object to string and vice versa.
- Since:
- Cytoscape 2.8.0
- Author:
- kono
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorUtil
public ColorUtil()
parseColorText
public static Color parseColorText(String colorAsText)
- Convert text representation of color into Color object.
This parser cupports the following test representation of color:
- Hex representation of color (e.g. #6677FF)
- RGB numbers (float or integer, e.g. (255, 10, 100))
- Java standard colors text representations (all lower case. e.g.
"black")
- Parameters:
colorAsText
-
- Returns:
- Color object
getColorAsText
public static String getColorAsText(Color color)
- Convert Color object into RGB String (e.g., (200,100,120))
- Parameters:
color
-
- Returns:
getComplementaryColor
public static Color getComplementaryColor(Color color1)
Copyright 2010 Cytoscape Consortium. All rights reserved.