@ColorInt
    public static int getColor(@NonNull Context context, @ColorRes int id) {
        if (Build.VERSION.SDK_INT >= 23) {
            return context.getColor(id);
        } else {
            return context.getResources().getColor(id);
        }
    }
Returns a color associated with a particular resource ID
<p>
Starting in {@link Build.VERSION_CODES#M}, the returned
color will be styled for the specified Context's theme.

@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.
@return A single color value in the form 0xAARRGGBB.
@throws android.content.res.Resources.NotFoundException if the given ID
                                                        does not exist.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ContextCompat.java