TIL: Figma provides a helper function for gradient transforms(wpconverters.com) |
TIL: Figma provides a helper function for gradient transforms(wpconverters.com) |
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";