Manipulating and Mixing Colors
Transform individual colors and combine them without mutating the source values.
In this chapter
Read in order or jump directly to a specific page.
-
Adjust lightness, chroma, and hue→
Choose the perceptual channel that matches the visual relationship you want to change.
-
Create grayscale and inverted colors→
Choose between removing perceptual chroma and calculating an RGB negative, two operations with different visual meanings.
-
Shift color temperature→
Use PHPColor's warm and cool hue heuristic without confusing it with physical color temperature.
-
Create tints and shades→
Choose endpoint mixing for tints and shades, and distinguish it from changing perceptual lightness directly.
-
Mix and composite colors→
Interpolate colors or composite a foreground over a backdrop.
-
Build transformation chains→
Order immutable color operations so each stage has one declared purpose and the final output is verified after serialization.