Software Development/Application Develop

WPF Random Color 생성

huiyu 2014. 2. 5. 22:51

랜덤한 색 생성하는 법 

Random rand = new Random();

            byte[] colorBytes = new byte[3];

            rand.NextBytes(colorBytes);

            Color randomColor = Color.FromRgb(colorBytes[0], colorBytes[1], colorBytes[2]);

728x90