public static (ColorRgb565, ColorRgb565) Variate565(ColorRgb565 c0, ColorRgb565 c1, int i) { int idx = i % varPatternEp0R.Length; var newEp0 = new ColorRgb565(); var newEp1 = new ColorRgb565(); newEp0.RawR = ByteHelper.ClampToByte(c0.RawR + varPatternEp0R[idx]); newEp0.RawG = ByteHelper.ClampToByte(c0.RawG + varPatternEp0G[idx]); newEp0.RawB = ByteHelper.ClampToByte(c0.RawB + varPatternEp0B[idx]); newEp1.RawR = ByteHelper.ClampToByte(c1.RawR + varPatternEp1R[idx]); newEp1.RawG = ByteHelper.ClampToByte(c1.RawG + varPatternEp1G[idx]); newEp1.RawB = ByteHelper.ClampToByte(c1.RawB + varPatternEp1B[idx]); return(newEp0, newEp1); }