I once had a line-follower robot kit (store-bought). As I recall it had only 2 photosensors, on either side of the line. The line had to be a darker color than the surroundings.
An op amp compared brightness levels from the two photosensors. It alternately sent power to the right or left drive wheel, depending on light hitting the sensors.
I did not test the robot with the line being lighter than the surroundings... But I don't think it would have worked. The two sensors knew how to handle only the one light/dark border situation.
I guess you have unpredictable situations?
So I believe you'll need three photosensors. The middle sensor will detect whether the line is a different color from the sensors.
The moving robot may have trouble initially acquiring a line. You may need to install some advanced logic.