const paintStyles = figma.createPaintStyle();
paintStyles.name = semanticStyle;
const paints = [{
blendMode : 'NORMAL',
color : rgb,
opacity : 1,
type : 'SOLID',
visible : true
}];
paintStyles.paints = paints;
In this above logic, when trying to set paintStyles. paints = paints, I get the error-
figma_app.min.js.br:4 Error: in set_paints: Expected “paints.s0].type” to be one of the allowed values for this property
at PaintStyle.set_paints nas paints] (eval at (eval at createScopedEvaluatorFactory
Based on this documentation, I see SOLID is a valid type.
I recently started working with Figma API so still new and learning. Thanks in advance!