MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getColors

Method getColors

ij/src/main/java/ij/plugin/Colors.java:272–281  ·  view source on GitHub ↗

Returns an array of the color Strings in the argument(s) and the 13 predefined color names "Red", "Green", ... "Pink". The Strings arguments must be either "None" or hex codes starting with "#". Any null arguments are ignored.

(String... moreColors)

Source from the content-addressed store, hash-verified

270 * The Strings arguments must be either "None" or hex codes starting with "#".
271 * Any null arguments are ignored. */
272 public static String[] getColors(String... moreColors) {
273 ArrayList names = new ArrayList();
274 for (String arg: moreColors) {
275 if (arg!=null && arg.length()>0 && (!Character.isLetter(arg.charAt(0))||arg.equals("None")))
276 names.add(arg);
277 }
278 for (String arg: colors2)
279 names.add(arg);
280 return (String[])names.toArray(new String[names.size()]);
281 }
282
283 /** Converts a wavelength (380-750 nm) to color.
284 * Based on the wavelength_to_rgb.R program at

Callers 5

showDialogMethod · 0.95
showDialogMethod · 0.95
arrowToolOptionsMethod · 0.95
showDialogMethod · 0.95
showDialogMethod · 0.95

Calls 6

charAtMethod · 0.80
lengthMethod · 0.65
addMethod · 0.65
equalsMethod · 0.45
toArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected