Get Color
Get the hexadecimal color value of a specific coordinate from the latest device screenshot.
Interface Description
Interface Type
getColorParameters
| 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) |
Return Value
Returns a string in RRGGBB format (uppercase), representing the RGB color of the requested pixel. Example: "2A9DF4".
Basic Usage
javascript
const color = await apiInvoke('getColor', {
deviceId: 'P72578581E07',
x: 128,
y: 256
});
console.log('Pixel color:', color); // e.g. "2A9DF4"