i think a pixel is in form of RGB like this &HFFFFFF, which the middle byte is Green, and the left byte is either Red or Blue (sorry forget the sequence)
if you want to compare 255 (i consider you want to compare a white pixel) you should compare with &HFFFFFF rather than 255 decimal.