示例#1
0
        public static RGBW GetRGBW(Color inp)
        {
            var result = new RGBW();

            result.W = (byte)(Math.Min(Math.Min(inp.R, inp.G), inp.B));

            result.R = (byte)(inp.R - result.W);
            result.G = (byte)(inp.G - result.W);
            result.B = (byte)(inp.B - result.W);

            return result;
        }
示例#2
0
        public static RGBW GetRGBW(Color inp)
        {
            var result = new RGBW();

            result.W = (byte)(Math.Min(Math.Min(inp.R, inp.G), inp.B));

            result.R = (byte)(inp.R - result.W);
            result.G = (byte)(inp.G - result.W);
            result.B = (byte)(inp.B - result.W);

            return(result);
        }