1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
OHOS-Color.md 17.85 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

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.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助