Continous color table for heatmap

In volume rendering I can hack something with manually adjusting things. But I need to be able to do this more consistently with more control over colors, and particularly in 2D as well.
Please provide pointers/suggestions.