For negative scaling values (say -p), the data is scaled linearly from the range (dataMin - dataMax) to the range (1 - 10p). Then the program takes the log (base 10) of that value (arriving at a number from 0 to p) and scales that linearly to the number of available colors. Thus the data is treated as if it had p decades of range, with an equal number of colors assigned to each decade.
For positive scaling values, the inverse (exponential) functions are used. If p is the (positive) value chosen, The data value is scaled linearly to lie between 0 and p, and 10 is raised to this power, yielding a value in the range (1 - 10p). Finally, that value is scaled linearly to the number of available colors.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .