Hi there!
Here you have a project programming a color sensor with mBot that could be interesting for you.