rainviewer / rainviewer-api-example

How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map
88 stars 29 forks source link

Hello, can you use your colors? #7

Closed djdandi closed 2 years ago

djdandi commented 2 years ago

Is it possible to use your chosen rainfall colors? If so, how to do it? I saw that you gave a csv file with colors, but how to change it for your colors? https://www.rainviewer.com/files/rainviewer_api_colors_table.csv

luckyalvy commented 2 years ago

In our rainviewer-api-example.html, there is an optionColorScheme variable, which can be any number between 0 and 8. That is the color scheme number. All the color schemes are described in our documentation on https://www.rainviewer.com/api/color-schemes.html

Changing this variable will change the color scheme of the rain layer accordingly.

djdandi commented 2 years ago

Yes, I know it, but I want to use my own colors - not the ones in the pattern.

luckyalvy commented 2 years ago

Then, the better solution for you is to load radar tiles in the Black, and White color schemed (with ID: 0) and then colorize it via your server application or canvas in a web browser before displaying for your customers.