Tego Bot API Documentation v0.2.0
Tego Bot API Documentation / getPixelColor
Function: getPixelColor()
getPixelColor(
x,y):Promise<ColorInfo>
Defined in: botjs/src/screenshot.ts:491
Get pixel color at specific coordinates (shorthand)
Parameters
x
number
X coordinate
y
number
Y coordinate
Returns
Promise<ColorInfo>
Color information
Example
typescript
const color = await getPixelColor(100, 200);
console.log(`Color at (100, 200): ${color.hex}`);