public static double getContrastRatio(@ColorInt final int rgb1, @ColorInt final int rgb2) {
        final double lumi1 = getLuminance(Color.red(rgb1), Color.green(rgb1), Color.blue(rgb1)) + 0.05;
        final double lumi2 = getLuminance(Color.red(rgb2), Color.green(rgb2), Color.blue(rgb2)) + 0.05;
        return Math.max(lumi1, lumi2) / Math.min(lumi1, lumi2);
    }
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