If it doesn't have to be automated, you could do it by masking solids of the appropriate colors to create the filled holes in the grid, then animating opacity. Takes 10 minutes tops.
Make each part of your grid a separate layer and animate opacity, scale, position, color, or any other thing you want to make the pieces appear. There is no easy way to do this with one layer.
Personally, I'd create the artwork in Illustrator with each section a closed path then release to layers, move the released layers to the top, delete the empty bottom layer, and import as a comp.
Thanks for the replies.
I am a relative starter in AE and really haven't looked at Illustrator yet so I am coming in as a bit of a beginner here.
"If it doesn't have to be automated, you could do it by masking solids of the appropriate colors". Not sure what you mean here by "If it doesn't have to be automated". I need to automate it so that when the straight line meets a particular cell the process of changing colours begins in that cell.
The grid will have 760 cells. If I use a separate layer for each cell, is 760 layers a reasonable thing to do in AE?