Normalize a texture by brightness?

Hi, is there a way to efficiently average a monochrome texture’s brightness (lightness) and adjust the texture accordingly so that it has a fixed value?

I can kinda do the same by splitting it into spreads, spectrally adding a channel (any one, since it’s a monochrome texture), etc. - but that’s terribly inefficient.

I know little to nothing about shaders, but could they potentially be used to aid this? Or is there a node that would help me that I’m not aware of? Thanks!

yes, you can do the same thing with a pixle shader.
calculating the brightness of each pixel will be much more efficient.

dirty way: use a shader to blur the picture and then take some pixels with the pipet.

u can try this
post-processing-normalize-color

That node actually looks great, antokhio!