I don't think the ball has to know where the black area is.

It only has to know what colors are beneath it. So it scans ever pixel underneath it, and determine what is the lowest part (darkest gray) from it's point of view and move towards that. Or should it be like, even if there is a valley of slightly dark gray (like 260) which is surrounded by brighter colors, and still be able to find it's way to the dark areas?

Anyway that is not good method if you are trying to create realistic ball movements. Creating realistic ball method, I think you only need to know the point(s) ball is touching the ground. Then (using basic psychics) you should be able to calculate vectors to tell ball where to move.