This guide explains how to check whether the P3 color space is supported on a given device using the supportsP3()
function and how to handle scenarios where P3 is unavailable.
supportsP3
returns whether the engine supports displaying and working in the P3 color space on the current device. Otherwise, this function throws an error with a description of why the P3 color space is not supported. If supported, the engine can be switched to a P3 color space using the “features/p3WorkingColorSpace” setting.
checkP3Support
throws an error if the engine does not support working in the P3 color space.
// Check whether the current device supports working in the P3 color spacelet p3IsSupported = try engine.editor.supportsP3()do { try engine.editor.checkP3Support()} catch { // P3 is not supported.}