Complete the code to set a solid fill color in Figma.
node.fills = [{ type: '[1]', color: { r: 1, g: 0, b: 0 } }];In Figma, to apply a solid fill, the type must be set to "SOLID".
Complete the code to set the fill color to blue using RGB values.
node.fills = [{ type: 'SOLID', color: { r: [1], g: 0, b: 1 } }];Blue color in RGB has red = 0, green = 0, and blue = 1 in Figma's 0-1 scale.
Fix the error in the code to correctly apply a semi-transparent red fill.
node.fills = [{ type: 'SOLID', color: { r: 1, g: 0, b: 0 }, [1]: 0.5 }];The correct property to set transparency in Figma fills is opacity.
Fill both blanks to create a green solid fill with full opacity.
node.fills = [{ type: '[1]', color: { r: 0, g: [2], b: 0 }, opacity: 1 }];Use 'SOLID' for solid fills and set green value to 1 for full green color.
Fill all three blanks to create a yellow solid fill with 75% opacity.
node.fills = [{ type: '[1]', color: { r: [2], g: [3], b: 0 }, opacity: 0.75 }];Yellow is made by red=1 and green=1 with blue=0. Use 'SOLID' type and set opacity to 0.75.
