'How to detect luminance of a container with background blur to change the colour of the text

The luminance of the blurred container changes based on the image in the background. Is there a way to detect the luminance of the image or the blurred container to change the text color? Preferably without processing images.

enter image description here



Sources

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

Source: Stack Overflow

Solution Source