Removegroupofblockiftheyarethesamecolor

Please segment the words:
Remove group of block if they are the same color