color_clamp in a separate function.