code: @SuppressWarnings("deprecation")
      public static @ColorInt int resolveColor(@ColorRes int color, Context context) {
          if (Build.VERSION.SDK_INT >= 23) {
              return context.getResources().getColor(color, context.getTheme());
          }
          else {
              return context.getResources().getColor(color);
          }
      }
docs: Resolves a color resource.
  
  @param color   the color resource
  @param context the current context
  @return a color int