Android 8.1 adds support for color management that can be used to provide a consistent experience across display technologies. Applications running on Android 8.1 can access the full capabilities of a wide gamut display to get the most out of a display device.

Previous Android releases did not include color management support and instead relied on content and displays being compatible (a goal often aided by the TV industry). However, recent display technologies allow for much larger gamut displays that do not display existing content as expected. With Android 8.1, devices that use a wide-gamut display (e.g. active-matrix organic light-emitting diode or AMOLED, some LCDs) will be able to see wide-gamut content from applications.

Determining device support

Devices with wide-color displays running Android 8.1 should support color management (wide-color). Before enabling this feature, ensure the device meets the following requirements:

If the above requirements are met, you can enable the color management feature for the device.

Implementing color management

To implement color management, you must first update the Hardware Composer 2 (HWC2) driver to understand color modes and to apply those modes to the hardware. Specifically, the HWC2 composer must report the Display-P3 and sRGB color modes using HWCDisplay::GetColorModes.

Next, enable the necessary OpenGL extensions and library support to translate OpenGL color spaces to HAL data spaces. Required OpenGL extensions include:

Android also provides the following optional extensions:

Customizing

You can customize the color management feature by including support for a variety of color standards such as DCI-P3, AdobeRGB, Rec709, Rec2020. Other customizations include:

Testing

To test color management, use the following resources in opengl/tests:

Reference implementation

For a reference implementation, refer to frameworks/native. For headers, refer to: