'How to plot .tif file colour coding onto the map using javascript?

I want to plot colour coding from .tif file into the map with the help of react-leaflet. How can this be done?
I am open for other better suggestions. My core goal is to display color coding given in geotiff file on an interactive map dynamically on a website.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source