@ColorInt
    private static Integer colorFromJson(final Integer currentColor, final JSONObject json, final String key, final String keyOpacity) {
        String colorString = null;
        double opacity = 1d;
        try {
            if (json != null && json.has(key)) {
                colorString = json.getString(key);
                int color = UNIT_TEST_MODE ? colorString.length() : Color.parseColor(colorString);
                opacity = keyOpacity == null ? Double.NaN : json.optDouble(keyOpacity, Double.NaN);
                if (opacity >= 0d && opacity <= 1d) {
                    color = UNIT_TEST_MODE ? color + (int) (opacity * 1000) :
                            Color.argb((int) (opacity * 255), Color.red(color), Color.green(color), Color.blue(color));
                }
                return color;
            }
        } catch (JSONException | IllegalArgumentException ex) {
            Log.w("Problems parsing color in json: '" + key + "'='" + colorString + "', '" + keyOpacity + "'=" + opacity, ex);
        }
        return currentColor;
    }
In UNIT TEST mode, the resulting color is the number of chars of the 'key' string plus 1000*opacity value
main/src/main/java/cgeo/geocaching/utils/GeoJsonUtils.java