Skip to main content

When working with the plugin API. We can extract color data by accessing the fill / strokes properties. During development I have come to the situation where I want to extract the final color of a node, let’s say a rectangle. By final color I mean the color the user actually sees on the Figma canvas. To simplify let’s assume our rectangle has only fills set.


From experimenting I know that the color appearing on the screen comes from the combination of blending of the fills array for the node, which is also affected by opacity of the fills, the nodes opacity and by the colors of nodes that don’t have opacity 1 and are before it on the z-axis, then if our fills (or the resulting color at this point) doesn’t have opacity one by the colors of nodes behind it on the z-axis.


Trying to calculate it myself I end up with a computation heavy operation if I would want to get the colors of each node in a layout (or the entire document). Yet Figma already knows does values as it renders them on the screen.


So my question is - am I missing something and the resulting color of a node is accessible by a simple property check? Or can we please request this to be added in a future release?

Be the first to reply!

Reply