Color purple = Color.FromArgb(128, 0, 128);
Color navy = Color.FromKnownColor(KnownColor.Navy);
int red = purple.R; // returns 128 int green = purple.G; // returns 0 int blue = purple.B; // returns 128This code gets the individual RGB components of the `purple` color object using the `.R`, `.G` and `.B` properties. The System.Drawing.Color class can be found in the System.Drawing assembly.