fixed jasmine tests for colormap  update and factored out the old algorithm for hit detection to its own namespace