So right now I have a number between 0 and 2^24, and I need to map it to three RGB values. I\'m having a bit of trouble on how I\'d accomplish this. Any assistance is apprec
Depending on which color is where, you can use bit shifting to get the individual colors like this:
int rgb = 0x010203;
var color = Color.FromArgb((rgb >> 16) & 0xff, (rgb >> 8) & 0xff, (rgb >> 0) & 0xff);
The above expression assumes 0x00RRGGBB but your colors might be 0x00BBGGRR in which case just change the 16, 8, 0 values around.
This also uses System.Drawing.Color instead of System.Windows.Media.Color or your own color class. That depends on the application.