@ColorInt
    public static int colorFromResource(@ColorRes final int colorRes) {
        return CgeoApplication.getInstance().getResources().getColor(colorRes);
    }
Calculates contrast ratio between two {@link Color} int according to W3
<p>
See <a href="https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef">...</a>

@param rgb1 first {@link Color} int
@param rgb2 second {@link Color} int
@return contrast ratio in range from 1 to 21
main/src/main/java/cgeo/geocaching/utils/ColorUtils.java