SymbolixAU / mapdeck

R interface to Deck.gl and Mapbox
https://symbolixau.github.io/mapdeck/articles/mapdeck.html
363 stars 40 forks source link

Reversing the order of the color palette? #318

Closed parnelli32 closed 4 years ago

parnelli32 commented 4 years ago

Is there a way to reverse the order of the color palette so that 0 corresponds with the lightest color?

dcooley commented 4 years ago

The default palette comes from

colourvalues::get_palette("viridis")

which is a 256-row matrix.

so if you use

palette = colourvalues::get_palette("viridis")[256:1,]

you'll have the reversed palette

dcooley commented 4 years ago

@parnelli32 does this answer your question?

parnelli32 commented 4 years ago

@dcooley it does! thank you