I posted a query over in the Processing forums that seems to point to a problem. That post (and test code) is at: https://forum.processing.org/topic/weirdness-with-color-variable#25080000002422275 Bottom line: using the following sequence of statements: PImage img = loadImage(inputFile); image(img, 0, 0,width,height); loadPixels(); color clr = pixels[indexvalue]; r=red(clr); g=green(clr); b=blue(clr); al=alpha(clr); Running on Windows 7, for both Processing 1.5.1 and Processing 2.0 REV 0218 , the r,g,b values are all correct. However while 1.5 returns the correct alpha value, 2.0 only returns 0 for all pixels. Also note that on further investigation, if I add either the P2D or P3D modifiers, the program works correctly so this problem has something to do with the default render mode.