javascript - Sketch 3 插件更改画板颜色

标签 javascript plugins sketch-3 sketchapp cocoascript

所以我似乎找不到改变画板背景颜色的方法。

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])

此草图引用链接可能有帮助(对我没有帮助) http://developer.sketchapp.com/reference/class/

最佳答案

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

关于javascript - Sketch 3 插件更改画板颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38379884/

相关文章:

eclipse - 哪里可以下载 Eclipse 3.6 (Helios) 的 GlassFish 插件

java - Centos 7 apache httpd无法加载weblogic插件库

android - 如何将 Sketch 3 中的 UI 资源或布局直接导入到 Android Studio?

macos - Sketch App 的 Apple 脚本

javascript - $scope.$apply 返回错误 undefined is not a function

django 插件框架设计模式

javascript - 如何在不使用 $watch 的情况下在多个 Controller 上保持服务数据相同?

file-conversion - 是否可以将 .Sketch 文件转换为 .SVG?

javascript - 选择第 n 个和第 n+N 个标记之间的内容

javascript - JQuery Click 函数只运行最后一个 IF 语句