Strip a photo to greyscale with filter: grayscale(1) to keep only luminance, then lay a two-colour gradient over it with mix-blend-mode: color — shadows pull toward the gradient's first colour, highlights toward the second.
An SVG feColorMatrix/feComponentTransfer pipeline is more precise, but a CSS filter plus a blend-mode gets close enough for most real work.
When to use
Use for album covers, event posters, or giving a set of team photos a unified look. Avoid it for product photography where true colour matters.