Utility Functions color values

I am using utilitiy functions like createWhiteGreen to color my WMS request. Now i want to create a legend for my web application.

I would like to know if there is a way to find out the min and max color values these functions use (e.g. HEX codes)?

Do you mean the min and max codes of the full WhiteGreen colormap? If so, you can find the Hex codes here.