Allow colorMap option to be specified as a function(index,value)

Issue 83