# getColor

Sample one screen pixel.

```js
getColor(x, y)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `x, y` | number | Native screen pixels. |

## Returns

{red, green, blue, alpha, hex}; channels 0..255 and hex "#RRGGBB". Invalid capture/position gives -1 channels and empty hex.

## Example

```js
console.log(getColor(100, 100));
```

## Notes

Use current screenshot coordinates; a color match alone does not identify a control.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
