Macbook: the external display dims when a dark UI is displayed

I run macOS Sierra 10.12.6 (16G1618) on a MacBook Pro 2015 and recently noticed that when dark websites or applications with a dark UI are shown (such as Spotify), the external display gradually dims.

For example, as I write this on the Ask Different website (with a clear and bright UI, mostly white), the brightness of the screen is normal. When I switch to Spotify, the screen starts after a couple of seconds to gradually darken for about 30 seconds until it fades a lot. When I return to Chrome with this website, it gradually shines again until it is normalized.

I do not know when this started, but I have not changed any hardware and I have not made any major macOS update recently, just the usual little updates that App Store notifies me about, Security update 2018-005 being the last on November 8, 2018.

I tried to disable System preferences > Monitor > Adjust the brightness automatically, but that did not change anything, I would have been surprised anyway, since it seems to apply only to the built-in screen (which is not dimmed at all …). I could not find any other configuration that could affect the brightness of the screen. There is no difference if it works with battery or power supply.

Anyone having the same problem ? Does anyone know what is happening? And, most importantly, does anyone know how to turn this off?