Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
colors.forEach((color, i) => {
let swatch = new Swatch(Object.assign({}, color, {
frame: {
x: 10,
y: i * 220 + 20,
width: 200,
height: 60
}
}));
let layerStyle = SharedStyle.LayerStyle({
name: color.label,
fills: [{
color: color.value
}]
});
sketch.addLayerStyle(layerStyle);
artboard.addLayer(swatch);
});
}