Converts a hex color (e.g., "ffff00") into "red", "green", "yellow", etc. Returns null if the hex color does not have a name. Unused in ImageJ, for compatibility only.
(String hex)
| 190 | * Returns null if the hex color does not have a name. |
| 191 | * Unused in ImageJ, for compatibility only. */ |
| 192 | public static String hexToColor(String hex) { |
| 193 | if (hex==null) return null; |
| 194 | Color color = decode(hex, null); |
| 195 | if (color==null) return null; |
| 196 | return getColorName(color, null, false); |
| 197 | } |
| 198 | |
| 199 | /** Converts a hex color (e.g., "ffff00" or "#ffff00") into a color name |
| 200 | * "Red", "Green", "Yellow", etc. |
nothing calls this directly
no test coverage detected