get_pixel_color
Retrieves the RGB, hex, and alpha color values of a single pixel at specified coordinates, optionally from a chosen image layer.
Instructions
Get the color of a single pixel.
Parameters:
x, y: Pixel coordinates
image_index: Target image index (default 0)
layer_name: Layer to sample from; defaults to active layer
Returns: {color_hex, color_rgb: [r, g, b], alpha}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x": "<x>",
"y": "<y>"
},
"name": "get_pixel_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| layer_name | No | ||
| image_index | No |