I spent hours trying to understand these transform values while building a Figma plugin. The breakthrough came when I discovered Figma's official helper function that nobody seems to know about.
Key findings:
- The values are a 3x2 affine transformation matrix
- They work in normalized coordinate space (0-1)
- Figma provides `extractLinearGradientParamsFromTransform()` to decode them
- The gradient handles don't directly map to the transform values
Hope this saves someone else the confusion I went through. Happy to answer questions about the math or implementation details.
import { extractLinearGradientParamsFromTransform } from "@figma-plugin/helpers";
drzivil•2h ago
Key findings: - The values are a 3x2 affine transformation matrix - They work in normalized coordinate space (0-1) - Figma provides `extractLinearGradientParamsFromTransform()` to decode them - The gradient handles don't directly map to the transform values
Hope this saves someone else the confusion I went through. Happy to answer questions about the math or implementation details.
import { extractLinearGradientParamsFromTransform } from "@figma-plugin/helpers";