MCPcopy Index your code
hub / github.com/processing/processing / getColor

Method getColor

app/src/processing/app/Settings.java:161–172  ·  view source on GitHub ↗
(String attribute)

Source from the content-addressed store, hash-verified

159
160
161 public Color getColor(String attribute) {
162 Color parsed = null;
163 String s = get(attribute);
164 if ((s != null) && (s.indexOf("#") == 0)) {
165 try {
166 int v = Integer.parseInt(s.substring(1), 16);
167 parsed = new Color(v);
168 } catch (Exception e) {
169 }
170 }
171 return parsed;
172 }
173
174
175 public void setColor(String attr, Color what) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
parseIntMethod · 0.80

Tested by

no test coverage detected