Parse table to separate into different groups of colour.