Fill Selection
photopea_fill_selectionFill the current selection with a solid color using hex codes, opacity levels, and blend modes. Modifies pixel data directly on the active layer.
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.
Input Schema
TableJSON 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. |