MCPcopy Index your code
hub / github.com/benfry/processing4 / getColor

Method getColor

app/src/processing/app/Preferences.java:333–342  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

331
332
333 static public Color getColor(String name) {
334 Color parsed = Color.GRAY; // set a default
335 String s = get(name);
336 if ((s != null) && (s.indexOf("#") == 0)) { //$NON-NLS-1$
337 try {
338 parsed = new Color(Integer.parseInt(s.substring(1), 16));
339 } catch (Exception ignored) { }
340 }
341 return parsed;
342 }
343
344
345 static public void setColor(String attr, Color what) {

Callers 4

PreferencesFrameMethod · 0.95
showFrameMethod · 0.95
mouseReleasedMethod · 0.95
paintComponentMethod · 0.95

Calls 2

getMethod · 0.95
parseIntMethod · 0.80

Tested by

no test coverage detected