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.Node ID
Color value (hex like #ff0000)
Returns the node ID and applied color.
set_stroke
Set the stroke (border) of a node.Node ID
Stroke color (hex)
Stroke weight (minimum: 0.1)
Stroke alignment. Options:
INSIDE, CENTER, OUTSIDEReturns the node ID, applied color, and weight.
set_stroke_align
Set stroke alignment of a node.Node ID
Stroke alignment. Options:
INSIDE, CENTER, OUTSIDEReturns 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.Node ID
Effect type. Options:
DROP_SHADOW, INNER_SHADOW, FOREGROUND_BLUR, BACKGROUND_BLURShadow color (hex). Ignored for blur.
Shadow X offset
Shadow Y offset
Blur radius (minimum: 0)
Shadow spread
Returns the node ID and total number of effects.
set_opacity
Set opacity of a node (0-1).Node ID
Opacity (0-1)
Returns the node ID and opacity value.
set_visible
Set visibility of a node.Node ID
Visible (true/false)
Returns the node ID and visibility state.
set_blend
Set blend mode of a node.Node ID
Blend mode. Options:
NORMAL, DARKEN, MULTIPLY, COLOR_BURN, LIGHTEN, SCREEN, COLOR_DODGE, OVERLAY, SOFT_LIGHT, HARD_LIGHT, DIFFERENCE, EXCLUSION, HUE, SATURATION, COLOR, LUMINOSITYReturns the node ID and blend mode.
set_rotation
Set rotation angle of a node in degrees.Node ID
Rotation angle in degrees
Returns the node ID and rotation angle.
set_radius
Set corner radius. Use individual corners for independent values.Node ID
Corner radius for all corners (minimum: 0)
Top-left radius (minimum: 0)
Top-right radius (minimum: 0)
Bottom-right radius (minimum: 0)
Bottom-left radius (minimum: 0)
Returns the node ID and corner radius.
set_locked
Set locked state of a node.Node ID
Locked (true/false)
Returns the node ID and locked state.
set_text
Set text content of a text node.Node ID
Text content
Returns the node ID and text content.
set_font
Set font properties of a text node.Node ID
Font family name
Font size (minimum: 1)
Font style (e.g. “Bold”, “Regular”, “Bold Italic”)
Returns the node ID, font name, and font size.
set_font_range
Set font properties for a text range.Node ID
Start character index (minimum: 0)
End character index (minimum: 0)
Font family name
Font size (minimum: 1)
Font style
Text color (hex)
Returns the node ID and range coordinates.
set_text_resize
Set text auto-resize mode.Node ID
Resize mode. Options:
NONE, WIDTH_AND_HEIGHT, HEIGHT, TRUNCATEReturns the node ID and text auto-resize mode.