OHOS::Color

Overview

Related Modules:

Graphic

Description:

Converts colors in different formats and defines common colors.

Since:

1.0

Version:

1.0

Summary

Static Public Member Functions

Static Public Member Function Name Description
GetMixColor (ColorType c1, ColorType c2, uint8_t mix) static ColorType Mixes two colors (color 1 and color 2) based on a specified opacity.
GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8) static ColorType Obtains the color based on the RGB color value.
GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha) static ColorType Obtains the color based on the RGBA color value.
ColorTo32 (ColorType color) static uint32_t Converts color data into the RGBA8888 format.
ColorTo32 (Color16 color, uint8_t alpha) static uint32_t Converts color data with the 16-bit color depth into the RGBA8888 format.
ColorTo16 (Color32 color) static uint16_t Converts color data from the RGBA8888 format into the RGB565 format.
White () static ColorType Obtains the color data of white.
Silver () static ColorType Obtains the color data of silver.
Gray () static ColorType Obtains the color data of gray.
Black () static ColorType Obtains the color data of black.
Red () static ColorType Obtains the color data of red.
Maroon () static ColorType Obtains the color data of maroon.
Yellow () static ColorType Obtains the color data of yellow.
Olive () static ColorType Obtains the color data of olive.
Lime () static ColorType Obtains the color data of lime.
Green () static ColorType Obtains the color data of green.
Cyan () static ColorType Obtains the color data of cyan.
Aqua () static ColorType Obtains the color data of aqua.
Teal () static ColorType Obtains the color data of teal.
Blue () static ColorType Obtains the color data of blue.
Navy () static ColorType Obtains the color data of navy.
Magenta () static ColorType Obtains the color data of magenta.
Purple () static ColorType Obtains the color data of purple.
Orange () static ColorType Obtains the color data of orange.

Additional Inherited Members

Additional Inherited Member Name Description
operator new (size_t size) Overrides the new function.
operator delete (void *p) Overrides the delete function.