HextoColor1 HexToColor 이전에 RGB 를 Hex 로 변경하는 함수를 만들었다. 이번에 반대의 개념으로 Hex값으로 Color 값을 만들어 보자 굳이 사용법을 언급할 필요가 있을까~~~ public Color setHexToColor(string hex) { //# 제거 if (hex.IndexOf('#') != -1) hex = hex.Replace("#", ""); int red = 0; int green = 0; int blue = 0; if (hex.Length == 6) { //RRGGBB 형태의 경우 red = int.Parse(hex.Substring(0, 2), NumberStyles.AllowHexSpecifier); green = int.Parse(hex.Substring(2, 2), NumberStyles.A.. 2010. 4. 6. 이전 1 다음