public int CompareTo(ColorFrugal other) { if (other == null) { return(1); } //Return the difference in power. return(this.a - other.a); }
public static Color[] GetMainColorsFromTexture2(Texture2D texture, int min_pixels_per_color) { Color32[] colors = texture.GetPixels32(); Debug.Log("Found Total colors:" + colors.Length); ColorFrugal[] sArray = new ColorFrugal[colors.Length]; for (int j = 0; j < colors.Length; ++j) { sArray[j] = new ColorFrugal(colors[j].r, colors[j].g, colors[j].b, colors[j].a); } return(GetHistogram2(colors, min_pixels_per_color)); }
public int CompareTo(object obj) { ColorFrugal other = (ColorFrugal)obj; if (other == null) { return(1); } //Return the difference in power. return(this.a - other.a); }
public bool Equals(ColorFrugal c) { return(c.r.Equals(r) && c.g.Equals(g) && c.b.Equals(b) && c.a.Equals(a)); }