Using #1177bb interpolates the error-amount as you go from 0x0 to 0xF, linearly scaling along the way from #000000 to #FFFFFF.
Now, if you're actually doing this with color, there one might also take optical color perception into play (where linear interpolation at small numbers/dark-colors is less perceptible than with bright saturated colors).