Store a color, sample colors from the screen, or compare colors. ARGB contains opacity (A), red (R), green (G), and blue (B); compare(), distance_rgb(), and delta_e() ignore opacity.
Syntax
Color(value, /)Constructor parameters
| Name | Description |
|---|---|
valueString | Number | Hex string (`#AARRGGBB`/`#RRGGBB`) or raw ARGB number. Required · Positional only No default |
Returns
Example
cursor = Point(540, 920)
picked = Color.get(cursor)
if picked == "#FFFFFFFF":
click(cursor, random=6)Fields
| Name | Description |
|---|---|
argbNumber | Raw ARGB integer value. |
aInt | Opacity from 0 (transparent) to 255 (opaque). |
rInt | Red channel 0-255. |
gInt | Green channel 0-255. |
bInt | Blue channel 0-255. |
hexString | Hex string `#AARRGGBB`. |
c1 = Color("#FFFFFFFF")
c2 = Color(4294967295)