Adjust GUI SDR peak luminance when display is in HDR PQ mode

I was wondering if it would be possible to implement something like this in CoreELEC:

This PR is meant for Android. It will reduce the brightness of the OSD and subtitles when an HDR or DV video is being played. Any chance something similar could be implemented on the Amlogic devices?