简体   繁体   English

Sketch 3插件更改画板颜色

[英]Sketch 3 Plugin Changing Artboard Color

So I can't seem to find the the method to change the color of the art board's background color. 因此,我似乎找不到改变美术板背景颜色的方法。

This is what i have currently just missing the method to set the color. 这就是我目前所缺少的设置颜色的方法。

var doc = context.document;
var artboard = MSArtboardGroup.new()
var artboardFrame = artboard.frame()

artboardFrame.setX(x)
artboardFrame.setY(y)
artboardFrame.setWidth(w)
artboardFrame.setHeight(h)

artboard.hasBackgroundColor = true;

doc.currentPage().addLayers([artboard])

This link to the sketch reference may help (didn't help me) http://developer.sketchapp.com/reference/class/ 草图参考的此链接可能有帮助(对我没有帮助) http://developer.sketchapp.com/reference/class/

artboard.backgroundColor = MSColor.colorWithSVGString("#FFCC00");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM