colormap icon indicating copy to clipboard operation
colormap copied to clipboard

YlOrRd & YlGnBu colormap typo?

Open afarme3 opened this issue 3 years ago • 2 comments

Hello, I have been using this library for colormapping geospatial data in OpenLayers - with an option for the user to choose between any of the colormaps available.

In the reference image, there are colormaps 'YlOrRd' and 'YlGnBu' , which I had removed because using this string for retrieving a colormap had thrown an error that the colormap did not exist.

Looking at colorScale.js , it looks like these are actually stored as 'yiorrd' and 'yignbu' - is the 'l' actually supposed to be an 'i'? 'RdBu' is also capitalized in the image and lowercase in the code.

Either this is a typo on the implementation end, or a typo on the reference image. With no user reference other than the image for the names to use for colormaps, this had me confused.

Could you please either update the naming in the code or in the image? Thank you.

afarme3 avatar Jan 09 '23 17:01 afarme3

It should be YlOrRd, YlGnBu, etc. (Yl = "Yellow") See https://colorbrewer2.org/export/colorbrewer.css

endolith avatar Jan 09 '23 19:01 endolith

Seconded. This is still an issue. Was getting wonky errors until I found this and changed my local reference from YlOrRd to YIOrRd, which works, but is obnoxious 😅

nickyonge avatar Oct 09 '23 21:10 nickyonge