Processing Forum
Like I said, it works. But the colors do no match. I took it one step further and graphed the 2 values in Excel. It clearly shows the values decreasing, but my blue completely disappears. I can not think of a better way to convert this number over. I was hoping for some ideas. Thanks.
int r = red_val/32; //64
int g = green_val/32; //64
int b = blue_val/64; //128
final_val=(r<<5)+(g<<2)+b; // red moves 5 bits to the left, green 2, and blue stays
RGBMatrix.fillPixel(0, row, col, final_val);