Refactered the color generation into parts - improved readability