Set Color Space

The Oculus 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 Oculus Quest’s displays. Once an app’s color space has been set, developers should see that the colors on the Oculus 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.

For information on color spaces, see the Color and Brightness Mastering Guide.

Set App’s Color Space

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 Oculus Quest’s displays. 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 Oculus 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:

ValueColor Space
VRAPI_COLORSPACE_UNMANAGEDSpecifies that no color correction should be applied. Recommended for research and testing only.
VRAPI_COLORSPACE_REC_2020Rec. 2020 color space. Preferred color space for standardized colors across all Oculus devices. This color space uses D65 (daylight) for its white point.
VRAPI_COLORSPACE_REC_709Rec. 709 color space. Uses the same primary color coordinates as sRGB.
VRAPI_COLORSPACE_RIFT_CV1Oculus Rift's unique color space.
VRAPI_COLORSPACE_RIFT_SOculus Rift S's unique color space.
VRAPI_COLORSPACE_QUESTThe Oculus Quest native color space, which is similar to the Oculus Rift CV1 color space.
VRAPI_COLORSPACE_P3DCI-P3 color space with D65 white point.
VRAPI_COLORSPACE_ADOBE_RGBAdobe RGB color space. Similar to sRGB, but with deeper greens using D65 for its white point.