public byte GetOrdered(LEDColor cl, RGBOrder order, int pos) { string r = order.ToString(); string p = r.Substring(pos, 1); switch (p) { case "R": return((byte)cl.Red); case "G": return((byte)cl.Green); case "B": return((byte)cl.Blue); } return(0); }
public LEDColor GetOrdered(LEDColor cl, RGBOrder order) { return(new LEDColor(GetOrdered(cl, order, 0), GetOrdered(cl, order, 1), GetOrdered(cl, order, 2))); }