Sketch 3 Plugin Changing Artboard Color

313 Views Asked by At

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/

1

There are 1 best solutions below

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