Create colorPercent func and move ram/cpu duplication there