huh, how I hadn't come across https://gmic.eu/ yet - nice image processing filter suite with CLI.
e.g. transfer colour histogram:
gmic -input source.jpg -input target.jpg -transfer_histogram  -output output.jpg
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!