How to change fog color based oh height?

I have a game the takes place 100% underwater and I want the fog to become darker the deeper the player goes. Does anyone know how I could do this?

The player moves around by looking in any direction and pressing w or s. Thanks for any help!

Grab a reference to the RenderSettings.fogStuff and change as player’s Y changes