How to make a nonlinear color palette

I am trying to plot data which spans a large range of values, and has both small and large features I want to visualize. The “mag” color palette which comes with GMT is almost what I need to magnify the small features while avoiding saturating the color scale with the larger features. However there are 2 main limitations to the mag palette:

  1. It doesn’t allow nonsymmetric intervals. I want my interval to span 0 to 150, but mag seems to require a symmetric interval, e.g. -150 to +150.

  2. mag uses discrete colors and doesn’t have a continuous option. I would prefer to have a continous palette instead of discrete colors.

Can someone recommend a way to make a nonlinear color palette like mag which fixes the above 2 issues? Perhaps someone has already made a palette to do what I want?

The mag palette can be seen here:

Have you look at makecpt? There there are many options to create your own cpt.