Added a function to calculate the color