Skip to main content
Glama

Add Gradient

photopea_add_gradient

Apply a linear gradient fill to an existing layer, replacing pixel content with custom hex colors distributed evenly at a specified angle.

Instructions

Apply a linear gradient fill to a layer, replacing its current pixel content. The target layer must already exist — use add_layer to create one first. Colors are distributed evenly across the gradient.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesLayer name (string) or index (number)
typeYesGradient type (currently only 'linear' is supported)
colorsYesArray of hex color stops distributed evenly along the gradient (minimum 2, e.g. ['#ff0000', '#0000ff'])
angleNoGradient angle in degrees (0 = left-to-right, 90 = top-to-bottom, default 0)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/attalla1/photopea-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server