Skip to main content
keeeel
New Member
Sep 22, 2025 11:58 PM UTC
Question

How to Get Linear Gradient from Figma MCP via Cline

Cline (vibe coding tool) is insisting that Figma MCP cannot provide gradient values, and is telling me the only way for it to grab gradient values is by guessing from a screenshot or having me provide directly. I can’t imagine this is the case-- or is that accurate?

This topic has been closed for replies.

1 reply

drzivil
New Member
Oct 26, 2025 6:15 AM UTC

I've been diving deep into Figma's gradient system recently, and I can help explain what's going on with those confusing transform values.
 

The Short Answer

Those gradientTransform values are a 3x2 affine transformation matrix that positions, rotates, and scales the gradient. Figma provides an official helper function that converts these into readable handle positions:

javascript

import { extractLinearGradientParamsFromTransform } from "@figma-plugin/helpers";

const params = extractLinearGradientParamsFromTransform(paint.gradientTransform);
// Returns: { start: {x, y}, end: {x, y}, width }

If you are interessted in Figma to Dev handoffs check out our Plugin where i have implemented this functionality:
https://www.figma.com/community/plugin/1492108013732875788/figma-to-oxygen-builder-for-wordpress-ready-made