Package ij.plugin
Class Colors
java.lang.Object
ij.plugin.Colors
- All Implemented Interfaces:
PlugIn
,ItemListener
,EventListener
This plugin implements most of the Edit/Options/Colors command.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
static int
static Color
static String
getColorName
(Color c, String defaultName) static String[]
static int
static int
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
void
This method is called when the plugin is loaded.
-
Field Details
-
colors
-
-
Constructor Details
-
Colors
public Colors()
-
-
Method Details
-
run
Description copied from interface:PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt. -
getColorName
-
getColor
-
decode
-
getRed
-
getGreen
-
getBlue
-
hexToColor
Converts a hex color (e.g., "ffff00") into "red", "green", "yellow", etc. Returns null if the color is not one of the eight primary colors. -
hexToColor2
Converts a hex color (e.g., "ffff00") into "Red", "Green", "Yellow", etc. Returns null if the color is not one of the eight primary colors. -
colorToString
Converts a Color into a string ("red", "green", #aa55ff, etc.). -
colorToString2
Converts a Color into a string ("Red", "Green", #aa55ff, etc.). -
itemStateChanged
- Specified by:
itemStateChanged
in interfaceItemListener
-
getColors
-