Display Legend in 3rd party webapp

Hi, is there a way I can display the gradient bar with values in a widget every time I call a WMS to render a particular index in my own website?

Hey, yes, this is possible.

Here is a description of how you can create a legend and request it via WMS.