Skip to main content

API/MCP support for fill type PATTERN

  • August 25, 2026
  • 0 replies
  • 1 view

d_greg

Since Figma introduced vector Pattern fill, it works pretty nice, yet there are some limitations and missing features.

 

API/MCP support

  • Claude does really good work generating lots of patterns, yet it doesn’t understand well the underlying mechanism around it
  • With further investigations, it looks like the API doesn’t support generating fill type `PATTERN`
  • node.fills = [{ type: "PATTERN", sourceNodeId, tileType, scalingFactor, spacing, ... }] throws a discriminator validation error. PATTERN is absent from the accepted set, which currently lists SOLID, SHADER, the four gradients, IMAGE, VIDEO.
  • Reads work fine, so the type round-trips as data but can't be written back. Even re-assigning an unmodified pattern paint read off an existing node fails.
  • createPaintStyle() accepts the call and silently stores a SOLID instead. The silent degradation is arguably its own bug and worth mentioning separately, since it fails without erroring.
  • clone() preserves pattern fills correctly, which shows the underlying data model is fine and it's purely the setter validator that's gating this.

 

Variables modes (eg theme)

  • When you work with the pattern source (eg a dot) and apply a color variable (eg. pattern-color, which has light and dark mode [or any]) the PATTERN doesn’t understands it; therefore you need to create fills for light and dark background. Would be great if PATTERN could support using colors from variable modes