Search code examples
iosswiftcolorsuicolorhdr

How to use HDR Colors in an iOS project?


I'd like to utilise the HDR display on OLED iPhone's for my apps to display vibrant colors like I've seen is possible in the iOS game 'FROST'. To be extra clear: I'm not looking for HDR support for video playback or camera capture.

UIColor has a lot of options like sRGB, P3 and Hue, Saturation and Brightness. I can't seem to figure out how to do HDR colors though.


Solution

  • My guess is that the game you're talking about uses SceneKit, where you just set this property on the "camera" object:

    https://developer.apple.com/documentation/scenekit/scncamera/1644101-wantshdr

    Otherwise HDR is just a way of encoding info into photos / videos and the iPhone X screen is a more vivid way of displaying that info.