Fill Selection
photopea_fill_selectionApplies a solid color fill to the active selection on the current layer. Requires an existing selection — create one with make_selection. Supports custom hex color, opacity, and blend mode. Modifies pixel data directly.
Instructions
Fill the current selection with a solid color on the active layer. Requires an active selection — use make_selection to create one first. Modifies pixel data on the active layer directly. Use clear_selection afterward to deselect.
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": {
"color": "<color>"
},
"name": "photopea_fill_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | Color as hex string (e.g. #ff0000) | |
| opacity | No | Fill opacity percentage (0 = fully transparent, 100 = fully opaque, default 100) | |
| blendMode | No | Blend mode for the fill (e.g. normal, multiply, screen, overlay, darken, lighten). Defaults to normal. |