Is there a way to conditionally select a Standard RGB color or a P3 color if the device supports it?
I thought about something like the following for iOS versions:
if #available(iOS 12.0, *) {
...
} else {
...
}
Is there a way to conditionally select a Standard RGB color or a P3 color if the device supports it?
I thought about something like the following for iOS versions:
if #available(iOS 12.0, *) {
...
} else {
...
}
UITraitCollectionhas adisplayGamutproperty, which is anenum UIDisplayGamutYou can query the “main screen”
or the display of a specific view (which can be different if an external monitor is used)