1# @ohos.graphics.common2D (Common Data Types of 2D Graphics)
2
3The common2D module defines some common data types in the 2D graphics field.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## Modules to Import
10
11```ts
12import { common2D } from '@kit.ArkGraphics2D';
13```
14
15## Color
16
17Describes a color in ARGB format.
18
19**System capability**: SystemCapability.Graphics.Drawing
20
21| Name | Type  | Readable | Writable | Description                                    |
22| ----- | ------ | ---- | ---- | ---------------------------------------- |
23| alpha | number | Yes  | Yes  | Alpha component of the color. The value is an integer ranging from 0 to 255. |
24| red   | number | Yes  | Yes  | Red component of the color. The value is an integer ranging from 0 to 255. |
25| green | number | Yes  | Yes  | Green component of the color. The value is an integer ranging from 0 to 255. |
26| blue  | number | Yes  | Yes  | Blue component of the color. The value is an integer ranging from 0 to 255. |
27
28## Rect
29
30Describes a rectangle, which can be defined by two coordinate points: upper left corner point and lower right corner point.
31
32**System capability**: SystemCapability.Graphics.Drawing
33
34| Name  | Type  | Readable | Writable | Description                          |
35| ------ | ------ | ---- | ---- | ------------------------------ |
36| left   | number | Yes  | Yes  | X coordinate of the upper left corner of the rectangle. The value is a floating point number. |
37| top    | number | Yes  | Yes  | Y coordinate of the upper left corner of the rectangle. The value is a floating point number. |
38| right  | number | Yes  | Yes  | X coordinate of the lower right corner of the rectangle. The value is a floating point number. |
39| bottom | number | Yes  | Yes  | Y coordinate of the lower right corner of the rectangle. The value is a floating point number. |
40
41## Point<sup>12+</sup>
42
43Describes a coordinate point.
44
45**System capability**: SystemCapability.Graphics.Drawing
46
47| Name  | Type  | Readable | Writable | Description                          |
48| ------ | ------ | ---- | ---- | ------------------------------ |
49| x      | number | Yes  | Yes  | Horizontal coordinate. The value is a floating point number.              |
50| y      | number | Yes  | Yes  | Vertical coordinate. The value is a floating point number.              |
51
52## Point3d<sup>12+</sup>
53
54Describes a 3D coordinate point. It inherits from [Point](#point12).
55
56**System capability**: SystemCapability.Graphics.Drawing
57
58| Name  | Type  | Readable | Writable | Description                          |
59| ------ | ------ | ---- | ---- | ------------------------------ |
60| z      | number | Yes  | Yes  | Z-axis coordinate. The value is a floating point number.              |
61