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

Such a great thread, thanks for all the gems in here gang!