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

Method decode

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

Converts a String with the color name or the hexadecimal representation of a color with 6 or 8 hex digits to a Color. With 8 hex digits, the first two digits are the alpha. With 6 hex digits, the color is opaque (alpha = hex ff). A hex String may be preceded by '#' such as "#80ff00". When the s

(String hexColor)

Source from the content-addressed store, hash-verified

141 * When the string does not include a valid color name or hex code,
142 * returns Color.GRAY. */
143 public static Color decode(String hexColor) {
144 return decode(hexColor, Color.gray);
145 }
146
147 /** Converts a String with the color name or the hexadecimal representation
148 * of a color with 6 or 8 hex digits to a Color.

Callers 15

showStatusMethod · 0.95
getColorMethod · 0.95
doDialogMethod · 0.95
overlayAddSelectionMethod · 0.95
getRoiColorMethod · 0.95
doColorMethod · 0.95
dialogItemChangedMethod · 0.95
convertImagesToStackMethod · 0.95
dialogItemChangedMethod · 0.95
getRedMethod · 0.95
getGreenMethod · 0.95

Calls 5

getColorMethod · 0.95
startsWithMethod · 0.80
substringMethod · 0.80
parseLongMethod · 0.80
lengthMethod · 0.65

Tested by

no test coverage detected