Multi color line follower robot with obstacle avoidance

I need guidance for my project based on multi color line follower robot with obstacle detection.

I'm using the following components for it's functions;
IR range sensor for an obstacle detection(range 30~40cm)
RGB color sensors for color detection on the path.
Stepper motors to drive rear 2 wheels individually and front one is omni directional.

Conditions:
1.Line follower robot should speed up when it detects green color and slow down when it detects blue color also it should stop when it detects red color.

2.All the above functions should work alongside IR sensor for obstacle detection.

Please come up with a logic to develop this program or any suggestions regarding how to design program for this.

Thank you

Have you got this robot to move yet?

Please come up with a logic to develop this program

What's our motivation?

Please don't PM members for help. Please post all relevant info here.

He's stated that he doesn't have any components yet....

First I suggest doing some reading with google. You could search "arduino line follower" and get thousands of hits.