ensuring colors in the gradient are copies of initialization value instead of reference, to prevent accidental runtime errors