vertex array and color

I am writing an application that need to display adjacent elements with different color, for reason of performance I am thinking about vertex array but I suspect that this won’t work, any suggestions?

I’m not using display list because of the high memory requirement and immediate mode because it is slow

Thanks for the help