Fixes and improvements to palettes and LinearColorMapper

fixes #1545