public Color32 GetDitheredColor(Color32 origColor, int x, int y) { Color32 result; // handling alpha if (origColor.A != Byte.MaxValue) { result = QuantizingSession.BlendOrMakeTransparent(origColor); if (result.A == 0) { return(result); } } else { result = origColor; } return(QuantizeWithOffset(result, GetOffset(x, y))); }