public class Colors extends Object implements PlugIn, ItemListener
Constructor and Description |
---|
Colors() |
Modifier and Type | Method and Description |
---|---|
static String |
colorToString(Color color)
Converts a Color into a string ("red", "green", #aa55ff, etc.).
|
static String |
colorToString2(Color color)
Converts a Color into a string ("Red", "Green", #aa55ff, etc.).
|
static Color |
decode(String hexColor,
Color defaultColor) |
static int |
getBlue(String hexColor) |
static Color |
getColor(String name,
Color defaultColor) |
static String |
getColorName(Color c,
String defaultName) |
static String[] |
getColors(String... moreColors) |
static int |
getGreen(String hexColor) |
static int |
getRed(String hexColor) |
static String |
hexToColor(String hex)
Converts a hex color (e.g., "ffff00") into "red", "green", "yellow", etc.
|
static String |
hexToColor2(String hex)
Converts a hex color (e.g., "ffff00") into "Red", "Green", "Yellow", etc.
|
void |
itemStateChanged(ItemEvent e) |
void |
run(String arg)
This method is called when the plugin is loaded.
|
public static final String[] colors
public void run(String arg)
PlugIn
public static int getRed(String hexColor)
public static int getGreen(String hexColor)
public static int getBlue(String hexColor)
public static String hexToColor(String hex)
public static String hexToColor2(String hex)
public static String colorToString(Color color)
public static String colorToString2(Color color)
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
Copyright © 1997–2018 NIH. All rights reserved.