Set Color Space (Deprecated)
Updated: Sep 29, 2022
Mobile SDK Deprecation
As of August 31, 2022, Mobile SDK and the VrApi library are no longer supported. Future updates will be delivered through OpenXR extensions and our OpenXR Mobile SDK, not through any new updates to Meta Mobile or PC APIs. - New apps must use OpenXR unless a waiver is granted.
- New apps will not have access to Meta Native Mobile APIs, but existing apps can continue using them.
- No assistance will be provided for creating new apps with Meta Native APIs. You will find recommendations for migrating existing apps to OpenXR in the developer guides.
- Only critical security, privacy, or safety issues in Meta Native APIs will be addressed.
- Any testing of Meta Native Mobile will be restricted to automated QA tests, only to ensure core features remain functional.
The Meta Quest uses its own color space that is different from many monitors used in development. The ColorSpace API allows developers to set the color space in which they have mastered their app so the appropriate colors are shown when the app appears on the Meta Quest’s displays. Once an app’s color space has been set, developers should see that the colors on the Meta Quest match the colors in which the app was mastered.
Mastering to a known color space on a monitor and using the ColorSpace API can reduce iteration time during development by minimizing time spent checking and adjusting colors on the device.
The vrapi_SetClientColorDesc
function is used to set the color space used by the client app. This function takes a pointer to the ovrMobile
context and a pointer to an ovrHmdColorDesc
structure that contains an ovrColorSpace
enumeration that declares the color space. Once the app’s color space has been set, the runtime will adjust the color for the displays of Meta Quest. Note that this function only handles color space remapping. It does not affect brightness, contrast, or gamma curves.
Note: If this function is never called, the client app will default to using the Rec. 2020 color space for Meta Quest.
Get the HMD’s Color Space
The vrapi_GetHmdColorDesc
function takes a pointer to the ovrMobile
context and returns a fixed value in an ovrHmdColorDesc
structure specifying the color space of the current HMD. Note that this is not a “get” function for vrapi_SetClientColorDesc
.
Supported color space values in ovrColorSpace
are as follows:
Value | Color Space |
VRAPI_COLORSPACE_UNMANAGED
| Specifies that no color correction should be applied. Recommended for research and testing only. |
VRAPI_COLORSPACE_REC_2020
| Rec. 2020 color space. This color space uses D65 (daylight) for its white point. |
VRAPI_COLORSPACE_REC_709
| Rec. 709 color space. Uses the same primary color coordinates as sRGB. |
VRAPI_COLORSPACE_RIFT_CV1
| Oculus Rift's unique color space. |
VRAPI_COLORSPACE_RIFT_S
| Oculus Rift S's unique color space. |
VRAPI_COLORSPACE_QUEST
| The Meta Quest native color space, which is similar to the Oculus Rift CV1 color space. |
VRAPI_COLORSPACE_P3
| DCI-P3 color space with D65 white point. |
VRAPI_COLORSPACE_ADOBE_RGB
| Adobe RGB color space. Similar to sRGB, but with deeper greens using D65 for its white point. |