@ColorInt
    @SuppressWarnings("deprecation")
    public static int getColor(@NonNull Resources res, @ColorRes int id, @Nullable Theme theme)
            throws NotFoundException {
        if (SDK_INT >= 23) {
            return res.getColor(id, theme);
        } else {
            return res.getColor(id);
        }
    }
Returns a themed color integer associated with a particular resource ID.
If the resource holds a complex {@link ColorStateList}, then the default
color from the set is returned.
<p>
Prior to API level 23, the theme will not be applied and this method
calls through to {@link Resources#getColor(int)}.

@param id    The desired resource identifier, as generated by the aapt
             tool. This integer encodes the package, type, and resource
             entry. The value 0 is an invalid identifier.
@param theme The theme used to style the color attributes, may be
             {@code null}.
@return A single color value in the form {@code 0xAARRGGBB}.
@throws NotFoundException Throws NotFoundException if the given ID does
                          not exist.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ResourcesCompat.java