apply_dither
Fills a rectangle with a Bayer 4x4 dither that blends two colors by density, returning an optional before/after preview with changed-pixel count and bounding box.
Instructions
Fill a rectangle with a uniform ordered (Bayer 4x4) dither mixing color1
and color2. density 0..1 is the fraction of color2 — 0.5 is an even
checker-style mix. One undo step. Headless: pass file.
preview true also returns a before/after picture of the canvas with the changed-pixel count and bbox.
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>",
"width": "<width>",
"height": "<height>",
"color1": "<color1>",
"color2": "<color2>"
},
"name": "apply_dither"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| file | No | ||
| width | Yes | ||
| color1 | Yes | ||
| color2 | Yes | ||
| height | Yes | ||
| density | No | ||
| preview | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |