65.9K
CodeProject is changing. Read more.
Home

Get Known Color from int value

starIconstarIconstarIconstarIconstarIcon

5.00/5 (1 vote)

Nov 18, 2009

CPOL
viewsIcon

14280

if you think Color myColor = Color.FromArgb(0); will give you the known color black, then you are wrong. you need to get it from the colortranlator class. like this: Color c = ColorTranslator.FromWin32(0); So what am i saying ?, is Color.FromArgb(0) not the same as ColorTranslator.FromWin32(

if you think Color myColor = Color.FromArgb(0); will give you the known color black, then you are wrong. you need to get it from the colortranlator class. like this:

Color c = ColorTranslator.FromWin32(0);

So what am i saying ?, is Color.FromArgb(0) not the same as ColorTranslator.FromWin32(0), well it is and it is'nt, its the same color (black), but the color struct is not the same. try it.