I just answered a question in which the OP basically wants a mathematical model for doing interpolation between color points in a way which would look natural to the human eye (and which presumably is not what linear interpolation would produce).
My answer was to pre-pick N colors and simply project from the initial input range to these color bands.
Which led me to wonder... how is it done here on SO?