Compare Color
Check whether the pixel at a specific coordinate in the latest screenshot matches the expected color, with optional channel deviation.
Interface Description
Interface Type
cmpColorParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| deviceId | string | Yes | Target device ID |
| x | number | Yes | X coordinate (0 ≤ x < screen width) |
| y | number | Yes | Y coordinate (0 ≤ y < screen height) |
| color | string | Yes | 6-digit hex color only, e.g. "FFCC00" |
| threshold | number | No | Default 1. Similarity = round((1 - threshold) * 255) with the same value applied to all three channels |
Return Value
Returns true if the pixel color falls within the tolerance of any segment; otherwise false.