Update colorbar.js

The check for the scale type was wrong (it had the same condition twice). I here check through the mathematical properties of the different scale types.
Merge pull request #1 from Enucatl/patch-1

Fixing scaletype tests.