Blog

Brighter than White — EDR on Macs

Stu Maschwitz observes that Apple has enabled the display HDR content on many older Macs models. Until now I thought this was a feature only for the very pricy Apple XDR Display hardware, but it looks like support also exists for the far more “ordinary” screens of some older Macs.

I downloaded the two HDR clips he shared and did a little experiment. And I think there’s one detail wrong in this paragraph from Stu’s blog:

Think of it this way: This EDR display philosophy is so important to Apple that they are willing to spend battery life on it. When you map “white” down to gray, you have to drive the LED backlight brighter for the same perceived screen brightness, using more power. Apple has your laptop doing this all the time, on the off chance that some HDR pixels come along to occupy that headroom.

I’m pretty sure it’s wrong to say they’re making the LED backlight brighter all the time. My observations support that the display brightness and color mappings change dynamically when some HDR content appears on screen. Those are reverted back to normal once the HDR image disappears. So no compromise on battery life until you put HDR content on your screen: the display is only made brighter while HDR content is visible.

Here’s how I came to that conclusion.

First of all, I have a late 2014 Retina 5K iMac, which appears to support EDR. (Wow!)

When I select one of Stu’s HDR video with the Finder in column view, it shows a preview in the rightmost column. When the preview first appears on screen, it is rendered normally, in SDR. It then progressively becomes brighter over the span of one or two seconds. Brighter than the surrouding white. This appears to be the EDR system firing up: slowly cranking up the display brightness at the same time as it darkens the standard white point for everything but the video. Those two operations are done in tandem so well that you don’t perceive any change on screen other than the video becoming brighter.

There are however some small side effects you can observe. I’ll take my free app Sim Daltonism to do some observations. Set it so it does not filter anything (the “normal vision” setting), and all it’ll do then is continuously take a screenshot and render it its window. As EDR is firing up you can observe those screenshots of the video in the window slowly becoming overexposed. That’s because Sim Daltonism screenshots comes from an EDR image that gets truncated to SDR. Here’s what it looks like:

Another thing you might notice while EDR is activating (or when it’s shutting down) is occasionally some of the frames in Sim Daltonism can be black, sometimes only for some windows in the screenshot. It’s as if the window server fails to produce a screenshot during the process of activating or shutting down EDR.

Note that for EDR to work (on this hardware) you can’t have your screen at full brightness. And thus when at full brightness, Sim Daltonism will not show you overexposed screenshots and you won’t see any black glitches. EDR cannot do anything at full brightness on this monitor, so there are no side effects so see.

On macOS Big Sur, when in dark mode, I noticed some white text labels are sensitive to EDR. (This looks like a bug.) When the video becomes visible on screen and EDR activates, those white text labels will slowly brighten at the same time as the video. I’ve located two of those labels for now: Safari’s active tab text (while the window is frontmost), and Gamma Control’s text label below the tabs (when the palette is set to translucent dark appearance). There’s also the checkmark for checked items in menus that appears affected. When you close the window with the video, they’ll slowly fade back to normal white. It can be a bit hard to see though.

Another Big Sur issue: running an app that tweaks the gamma curve can break this EDR system temporarily. If you open and then quit Gamma Control, or do the same with Apple’s Calibration Assistant, the image of the HDR suddenly lose its EDR-enhanced brightness. It’ll regains its brightness the next time you open an app (any app). At least it does that on my iMac. If you’re at Apple, see FB8929660.

This has been tested on macOS Big Sur 11.0.1 and Catalina 10.15.7.


macOS Big Sur and M1 Macs

As the new version of macOS is around the corner and the first Macs with a new processor type will be shipped soon, I want to state that my apps are already fully compatible with both. Here’s the current state of things and what’s to expect in the near future.

macOS Big Sur makes many changes, visual ones especially, but those changes aren’t causing any problems to my apps.

Gamma Control, Black Light, Black Light Pro, Counterparts Lite, Sim Daltonism and Red Stripe are all ready for Big Sur as they are now.

The M1 chip in the new Macs uses a different instruction set than Intel processors in the previous models. But macOS can run most apps built for Intel by translating them using Rosetta. As a user, this happens without you noticing anything. I already tested all my apps and can confirm they all run fine using Rosetta.

There’s one thing I couldn’t verify myself in advance though: whether the new hardware supports setting the gamma correction curve. This is needed for Gamma Control, Black Light, and Black Light Pro to do what they do. I’ve been specifically told it should work. And given that some parts of macOS also depend on this I’m not expecting any problems.

I plan to update all my Mac apps in the coming weeks. They’ll get a nice new icon for Big Sur and some will gain interesting new features. They’ll also become universal so they can work natively on M1 without using Rosetta.


Sim Daltonism’s purple bug

Back in 2016, I converted the filter algorithm in Sim Daltonism 1.x to OpenGL shader code so it’d run on the GPU and have better performance. This also made it possible to bring it to iOS as a real-time filter for the camera. A bug slipped through however.

On a filtered color wheel we can observe that a region of deeply saturated blue becomes purple. This makes no visual sense: purple light is blue light + red light, and this purple area showed up even for protanopia (no red cones). This also wasn’t happening with version 1, and it wasn’t happening on the Color Laboratory on which Sim Daltonism’s filter algorithm is based.

I dug up the code for version 1 and tried to find differences. I did not have much success at finding accidental algorithmic differences. So I finally tried to clamp some values within the 0…1 range they were supposed to be in; theoretically the result of the calculation shouldn’t be out of this range but that doesn’t account for rounding errors in floating point calculations. GPUs are quite fast, but they sometimes sacrifice precision to achieve that speed. And that did the trick.

So now there’s a new version of Sim Daltonism with a corrected filter on both Mac and iOS. And I want to thank Lisa Charlotte Rost for signaling this bug after comparing with other color blindness simulation tools.


More Hot Keys in Black Light Pro

Some people find their display too bright, and some displays are actually too bright. You can dim the backlight of your display, but what if the lowest setting is still too bright? Then you can use Black Light or Black Light Pro to dim the display more… problem solved? Not entirely it seems.

I occasionally get requests for ways to dim the display using global keyboard shortcuts, often known as “hot keys”. In Black Light Pro you can have many effects configured with various dim levels, and you can assign a hot key to each. But wouldn’t it be better to have two keys for increasing or decreasing the brightness? The new version of Black Light Pro is making this possible, and more.

With version 1.2 of Black Light Pro you can now set hot keys to increase and decrease brightness, change the tinting vividness and hue, toggle the invert effect, etc. Those changes will be saved to the current active effect.

If you have more than one monitor, you can apply the same effect on all of them or apply a different effect to each. In the former case hot keys will control the effect for all the screens at the same time. In the later case hot keys will let you to control each screen independently, with one hot key to cycle between them.

Black Light Pro comes with a 30-day trial so you can experience it yourself.



  • © 2003–2021 Michel Fortin.