cleaned codes and preparing for colors percentage