Click to See Complete Forum and Search --> : Trouble using RGB values with System.Color


msuttorp
May 21st, 2002, 11:42 AM
I want to use RGB color values in GDI+ objects like the Pen etc. This is because I must be able to read files that carry RGB information.
So far I have been unable to find out how this can be done. First I thought setting the A,R,G,B properties of a System.Color structure would do the job, but of course then I found that these were read-only.

Does anybody have an idea?

Thanks
Manfred

Arild Fines
May 21st, 2002, 02:44 PM
Try this:

Color col = Color.FromArgb( alpha, red, green, blue );


Dunno why they made it a factory method instead of just a plain constructor.