package com.miguelgaeta.bootstrap.mg_color;

import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.AttrRes;
import android.support.annotation.ColorRes;
import android.support.v4.content.ContextCompat;
import android.util.TypedValue;

import lombok.NonNull;

/**
 * Created by Miguel Gaeta on 10/12/15.
 */
public class MGColor {

    public static int fromResource(@NonNull Context context, @ColorRes int colorResourceId) {

        return ContextCompat.getColor(context, colorResourceId);
    }

    public static int fromTheme(@NonNull Context context, @AttrRes int attributeResourceId) {

        final TypedValue typedValue = new TypedValue();

        final Resources.Theme theme = context.getTheme();

        theme.resolveAttribute(attributeResourceId, typedValue, true);

        return typedValue.data;
    }
}

@@ -147,24 +147,68 @@
 on.AttrRes;%0A
+import android.support.annotation.ColorInt;%0A
 import andro
@@ -235,24 +235,24 @@
 n.ColorRes;%0A
-
 import andro
@@ -413,24 +413,56 @@
  MGColor %7B%0A%0A
+    @SuppressWarnings(%22unused%22)%0A
     public s
@@ -459,32 +459,42 @@
   public static 
+@ColorInt 
 int fromResource
@@ -626,16 +626,48 @@
 %0A    %7D%0A%0A
+    @SuppressWarnings(%22unused%22)%0A
     publ
@@ -676,16 +676,26 @@
  static 
+@ColorInt 
 int from

Add return type annotations.