Refactor colorizeMeasures