I would like to get the color of the pixel that is under the mouse pointer. I thought I would be clever and just do a grabScreen() of 1x1 pixel and then do a getPixels() and get the color. It’s not working though, I get ‘chars’ instead of numbers. Any ideas?
as i said in the previous post you need to cast when using cout, the internal type of ofPixels or ofColor is unsigned char so when printing it it’ll print it as a char not as a number but the information is correct.
It’s just that when I take the unsigned char and use it to define a color and then print the value in one of the color channels it’s still printed as a char. Which confuses me. I can use the color in my program though, it seems to work fine. So I guess I don’t need to worry about it and just ‘cast’ it if I want to look at the value for debug purposes or something…