Sorting shapes according to colour and shape