private int ConvertColorToRGB(Color col)If you are using VB.NET, it still has an RGB function to call.
return (col.R) | (col.G << 8) | (col.B << 16);
Friday, October 21, 2011
If you still have to deal with the Win32Api in C#, you may need to get the old-style RGB composite color values from a .NET Color value. The ToArgb method doesn't work like you want, so it has to be computed: