Changeset 885 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2008-08-28T22:07:04+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
r627 r885 12 12 if (html.length() > 0 && html.charAt(0) == '#') 13 13 html = html.substring(1); 14 if (html.length() != 6)14 else if (html.length() != 6 && html.length() != 8) 15 15 return null; 16 16 try { … … 18 18 Integer.parseInt(html.substring(0,2),16), 19 19 Integer.parseInt(html.substring(2,4),16), 20 Integer.parseInt(html.substring(4,6),16)); 20 Integer.parseInt(html.substring(4,6),16), 21 (html.length() == 8 ? Integer.parseInt(html.substring(6,8),16) : 255)); 21 22 } catch (NumberFormatException e) { 22 23 return null;
Note:
See TracChangeset
for help on using the changeset viewer.