public static S_Color Parse(string content) { var array = content.Split(','); S_Color newColor = default; for (int i = 0; i < 4; i++) { byte number = byte.Parse(array[i]); switch (i) { case 0: newColor.R = number; break; case 1: newColor.G = number; break; case 2: newColor.B = number; break; case 3: newColor.A = number; break; } } return(newColor); }
public static Color S_ColorConvert(S_Color color) => Color.FromArgb(color.A, color.R, color.G, color.B);