apply_gradient_rect
Fill a rectangular area with a linear gradient between two colors, with horizontal or vertical direction, to create shaded backgrounds or color transitions in Aseprite sprites and animations.
Instructions
Apply a linear gradient fill to a rectangle.
Args: filename (str): The path to the Aseprite file. layer_name (str): The name of the layer to draw on. frame_index (int): The index of the frame to draw on. x (int): The x coordinate of the rectangle to draw on. y (int): The y coordinate of the rectangle to draw on. width (int): The width of the rectangle to draw on. height (int): The height of the rectangle to draw on. color_start (str): The start color of the gradient. color_end (str): The end color of the gradient. horizontal (bool, optional): Whether to draw the gradient horizontally. Defaults to True. create_if_missing (bool, optional): Whether to create the layer if it doesn't exist. Defaults to True.
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": {
"filename": "<filename>",
"layer_name": "<layer_name>",
"frame_index": "<frame_index>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"color_start": "<color_start>",
"color_end": "<color_end>"
},
"name": "apply_gradient_rect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| filename | Yes | ||
| color_end | Yes | ||
| horizontal | No | ||
| layer_name | Yes | ||
| color_start | Yes | ||
| frame_index | Yes | ||
| create_if_missing | No |