desaturate(0.06)
#7c768f
Adjust color chroma
Increase or reduce OKLCH chroma with an explicit relative amount while preserving the source color.
#806eae
saturate(0.06)
#8562cc
C -0.06OKLCH chromaC +0.06
Change intensity on one defined coordinate
The familiar method names change OKLCH chroma, not HSL saturation. Native lightness, hue, and alpha remain fixed before conversion back to SrgbColor.
Add or subtract chroma explicitly
saturate() adds the supplied amount. desaturate() subtracts its absolute value. Both leave the source object unchanged.
<?php
use PhpColor\Color\Color;
$source = Color::parse('#806eae');
$reduced = $source->desaturate(0.06);
$increased = $source->saturate(0.06);
echo $reduced->toHex(); // #7c768f
echo $source->toHex(); // #806eae
echo $increased->toHex(); // #8562cc
use PhpColor\Color\Color;
$source = Color::parse('#806eae');
$reduced = $source->desaturate(0.06);
$increased = $source->saturate(0.06);
echo $reduced->toHex(); // #7c768f
echo $source->toHex(); // #806eae
echo $increased->toHex(); // #8562cc
Chroma is not lightness
Chroma changes color intensity without intentionally moving native OKLCH lightness. Use the lightness operation when lighter and darker variants are the actual goal.
Inspect the target-gamut output
PHPColor does not gamut-map an increased-chroma result automatically. Hexadecimal serialization can quantize native channels and clamp out-of-range RGB output.
Do not describe saturate() as HSL or sRGB saturation.
The three demonstrated values are bounded fixtures, not a promise for every chroma increase.