I would suggest to rework the code as suggested above. The `colors_equal` can stay since it might be useful somewhere else.