Implement (hopefully) correct recoloring