SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

APIs missing: Set Fills opacity

Open matteogratton opened this issue 3 years ago • 0 comments

It is currently impossible to set the general opacity for the fill. This is not noticeable for default color fills, as the general opacity and the color opacity are the same. For gradients and patterns, this is more uncomfortable.

This is the area I am referring to: CleanShot 2022-06-23 at 11 48 27

The current way to set it is via: layer.style.sketchObject.fills()[1].contextSettings().setOpacity(0.5);

It would be nice to have something like: layer.style.fills[value].opacity = 0.5

It is also missing a way to read the option: layer.style.sketchObject.fills()[1].contextSettings().opacity();

matteogratton avatar Jun 23 '22 10:06 matteogratton