private static float luminanceOfColorComponent(float c) {
        c /= 255f;
        return (c < 0.03928f) ? c / 12.92f : (float) Math.pow((c + 0.055f) / 1.055f, 2.4f);
    }
Determines whether to use dark icons on a background with given color by comparing the
contrast ratio (https://www.w3.org/TR/WCAG20/#contrast-ratiodef) to a threshold.
This criterion matches the one used by Chrome:
https://chromium.googlesource.com/chromium/src/+/90ac05ba6cb9ab5d5df75f0cef62c950be3716c3/chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java#215
customtabs/src/android/support/customtabs/trusted/Utils.java