--- a/net/minecraft/item/DyeColor.java
+++ b/net/minecraft/item/DyeColor.java
@@ -41,6 +41,7 @@
    private final int field_196066_w;
    private final float[] field_193352_x;
    private final int field_196067_y;
+   private final net.minecraftforge.common.Tags.IOptionalNamedTag<Item> tag;
    private final int field_218390_z;
 
    private DyeColor(int p_i50049_3_, String p_i50049_4_, int p_i50049_5_, MaterialColor p_i50049_6_, int p_i50049_7_, int p_i50049_8_) {
@@ -53,6 +54,7 @@
       int j = (p_i50049_5_ & '\uff00') >> 8;
       int k = (p_i50049_5_ & 255) >> 0;
       this.field_196066_w = k << 16 | j << 8 | i << 0;
+      this.tag = net.minecraft.tags.ItemTags.createOptional(new net.minecraft.util.ResourceLocation("forge", "dyes/" + p_i50049_4_));
       this.field_193352_x = new float[]{(float)i / 255.0F, (float)j / 255.0F, (float)k / 255.0F};
       this.field_196067_y = p_i50049_7_;
    }
@@ -111,4 +113,25 @@
    public String func_176610_l() {
       return this.field_176785_v;
    }
+
+   public int getColorValue() {
+      return field_193351_w;
+   }
+
+   public net.minecraftforge.common.Tags.IOptionalNamedTag<Item> getTag() {
+      return tag;
+   }
+
+   @Nullable
+   public static DyeColor getColor(ItemStack stack) {
+      if (stack.func_77973_b() instanceof DyeItem)
+         return ((DyeItem)stack.func_77973_b()).func_195962_g();
+
+      for (DyeColor color : field_196062_q) {
+         if (stack.func_77973_b().func_206844_a(color.getTag()))
+             return color;
+      }
+
+      return null;
+   }
 }
