How can the saturation of a color be adjusted in PHP to create a color nuance?

To adjust the saturation of a color in PHP, you can use the `imagefilter` function with the `IMG_FILTER_COLORIZE` filter. This filter allows you to adjust the hue, saturation, and brightness of an image. By adjusting the saturation value, you can create a color nuance by making the color more or less vibrant.

// Load the image
$image = imagecreatefromjpeg('example.jpg');

// Adjust the saturation by applying the IMG_FILTER_COLORIZE filter
imagefilter($image, IMG_FILTER_COLORIZE, 0, -50, 0);

// Output the modified image
header('Content-Type: image/jpeg');
imagejpeg($image);

// Free up memory
imagedestroy($image);