Is there a material function that works like Photoshop's Gradient Map?

I’m looking for something more like this Colorizing Images With Gradients In Photoshop