Skip to content

Get Color

Get the hexadecimal color value of a specific coordinate from the latest device screenshot.

Interface Description

Interface Type

getColor

Parameters

ParameterTypeRequiredDescription
deviceIdstringYesTarget device ID
xnumberYesX coordinate (0 ≤ x < screen width)
ynumberYesY 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"

Cooperation: try.catch@foxmail.com