Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/open-pencil/open-pencil/llms.txt

Use this file to discover all available pages before exploring further.

set_fill

Set the fill color of a node. Accepts hex (#ff0000) or named color.
id
string
required
Node ID
color
color
required
Color value (hex like #ff0000)
Returns
object
Returns the node ID and applied color.

set_stroke

Set the stroke (border) of a node.
id
string
required
Node ID
color
color
required
Stroke color (hex)
weight
number
default:"1"
Stroke weight (minimum: 0.1)
align
string
default:"INSIDE"
Stroke alignment. Options: INSIDE, CENTER, OUTSIDE
Returns
object
Returns the node ID, applied color, and weight.

set_stroke_align

Set stroke alignment of a node.
id
string
required
Node ID
align
string
required
Stroke alignment. Options: INSIDE, CENTER, OUTSIDE
Returns
object
Returns the node ID and stroke alignment.

set_effects

Set effects on a node (drop shadow, inner shadow, blur). Pass an array or a single effect.
id
string
required
Node ID
type
string
required
Effect type. Options: DROP_SHADOW, INNER_SHADOW, FOREGROUND_BLUR, BACKGROUND_BLUR
color
color
Shadow color (hex). Ignored for blur.
offset_x
number
default:"0"
Shadow X offset
offset_y
number
default:"4"
Shadow Y offset
radius
number
default:"4"
Blur radius (minimum: 0)
spread
number
default:"0"
Shadow spread
Returns
object
Returns the node ID and total number of effects.

set_opacity

Set opacity of a node (0-1).
id
string
required
Node ID
value
number
required
Opacity (0-1)
Returns
object
Returns the node ID and opacity value.

set_visible

Set visibility of a node.
id
string
required
Node ID
value
boolean
required
Visible (true/false)
Returns
object
Returns the node ID and visibility state.

set_blend

Set blend mode of a node.
id
string
required
Node ID
mode
string
required
Blend mode. Options: NORMAL, DARKEN, MULTIPLY, COLOR_BURN, LIGHTEN, SCREEN, COLOR_DODGE, OVERLAY, SOFT_LIGHT, HARD_LIGHT, DIFFERENCE, EXCLUSION, HUE, SATURATION, COLOR, LUMINOSITY
Returns
object
Returns the node ID and blend mode.

set_rotation

Set rotation angle of a node in degrees.
id
string
required
Node ID
angle
number
required
Rotation angle in degrees
Returns
object
Returns the node ID and rotation angle.

set_radius

Set corner radius. Use individual corners for independent values.
id
string
required
Node ID
radius
number
Corner radius for all corners (minimum: 0)
top_left
number
Top-left radius (minimum: 0)
top_right
number
Top-right radius (minimum: 0)
bottom_right
number
Bottom-right radius (minimum: 0)
bottom_left
number
Bottom-left radius (minimum: 0)
Returns
object
Returns the node ID and corner radius.

set_locked

Set locked state of a node.
id
string
required
Node ID
value
boolean
required
Locked (true/false)
Returns
object
Returns the node ID and locked state.

set_text

Set text content of a text node.
id
string
required
Node ID
text
string
required
Text content
Returns
object
Returns the node ID and text content.

set_font

Set font properties of a text node.
id
string
required
Node ID
family
string
Font family name
size
number
Font size (minimum: 1)
style
string
Font style (e.g. “Bold”, “Regular”, “Bold Italic”)
Returns
object
Returns the node ID, font name, and font size.

set_font_range

Set font properties for a text range.
id
string
required
Node ID
start
number
required
Start character index (minimum: 0)
end
number
required
End character index (minimum: 0)
family
string
Font family name
size
number
Font size (minimum: 1)
style
string
Font style
color
color
Text color (hex)
Returns
object
Returns the node ID and range coordinates.

set_text_resize

Set text auto-resize mode.
id
string
required
Node ID
mode
string
required
Resize mode. Options: NONE, WIDTH_AND_HEIGHT, HEIGHT, TRUNCATE
Returns
object
Returns the node ID and text auto-resize mode.