Bird
Raised Fist0
Figmabi_tool~10 mins

Color styles in Figma - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new color style named "Primary Blue".

Figma
const primaryBlue = figma.createPaintStyle();
primaryBlue.name = [1];
Drag options to blanks, or click blank then click option'
APrimary Blue
B"Primary Blue"
C'Primary Blue'
DPrimaryBlue
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the style name.
Using variable names without quotes.
2fill in blank
medium

Complete the code to set the color of a paint style to pure red.

Figma
const redPaint = { r: [1], g: 0, b: 0 };
style.paints = [redPaint];
Drag options to blanks, or click blank then click option'
A100
B255
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 255 instead of 1 for RGB values.
Setting green or blue to non-zero values.
3fill in blank
hard

Fix the error in setting the paint style's paints array.

Figma
style.paints = [1];
Drag options to blanks, or click blank then click option'
A[redPaint]
B{ redPaint }
CredPaint
D(redPaint)
Attempts:
3 left
💡 Hint
Common Mistakes
Assigning a single object instead of an array.
Using parentheses or curly braces instead of square brackets.
4fill in blank
hard

Fill both blanks to create a new color style with a blue color.

Figma
const bluePaint = { r: [1], g: [2], b: 1 };
const blueStyle = figma.createPaintStyle();
Drag options to blanks, or click blank then click option'
A0
B1
C0.5
D255
Attempts:
3 left
💡 Hint
Common Mistakes
Using 255 instead of 0 or 1.
Setting green or red to non-zero values.
5fill in blank
hard

Fill all three blanks to create a green color style and assign it correctly.

Figma
const greenPaint = { r: [1], g: [2], b: [3] };
greenStyle.paints = [greenPaint];
Drag options to blanks, or click blank then click option'
A0
B1
C0.5
D255
Attempts:
3 left
💡 Hint
Common Mistakes
Using 255 instead of 1 or 0.
Mixing up the RGB channels.

Practice

(1/5)
1. What is the main benefit of using Color Styles in Figma?
easy
A. They add animations to elements.
B. They automatically create new shapes.
C. They change font sizes globally.
D. They keep colors consistent across your design.

Solution

  1. Step 1: Understand the purpose of Color Styles

    Color Styles are used to keep colors consistent in a design project.
  2. Step 2: Compare options with the purpose

    Only 'They keep colors consistent across your design.' correctly states that Color Styles keep colors consistent.
  3. Final Answer:

    They keep colors consistent across your design. -> Option D
  4. Quick Check:

    Color Styles = Consistent colors [OK]
Hint: Color Styles = consistent colors everywhere [OK]
Common Mistakes:
  • Confusing color styles with font or shape features
  • Thinking color styles create animations
  • Assuming color styles change font sizes
2. Which of the following is the correct way to create a new color style in Figma?
easy
A. Select a shape with a fill color, then click 'Create Style' in the Fill section.
B. Draw a rectangle and rename it to 'Color Style'.
C. Change the font color and save it as a style.
D. Right-click on the canvas and select 'New Color Style' from the menu.

Solution

  1. Step 1: Identify how to create a color style

    In Figma, you create a color style by selecting an object with a fill color and clicking 'Create Style' in the Fill section.
  2. Step 2: Evaluate each option

    'Select a shape with a fill color, then click "Create Style" in the Fill section.' matches the correct method. Options B, C, and D describe incorrect or impossible actions.
  3. Final Answer:

    Select a shape with a fill color, then click 'Create Style' in the Fill section. -> Option A
  4. Quick Check:

    Create Style button in Fill = new color style [OK]
Hint: Use 'Create Style' button on fill color [OK]
Common Mistakes:
  • Trying to create color style by renaming shapes
  • Assuming font color changes create color styles
  • Looking for 'New Color Style' in right-click menu
3. If you update a color style named Primary Blue, what happens to all elements using this style?
medium
A. All elements using Primary Blue update automatically.
B. Elements keep their old color unless manually changed.
C. Only new elements will use the updated color.
D. The color style is deleted after update.

Solution

  1. Step 1: Understand color style updates

    When a color style is updated, all elements using that style update automatically to reflect the change.
  2. Step 2: Analyze each option

    All elements using Primary Blue update automatically. correctly states this behavior. Options A and B are incorrect because changes apply immediately to all linked elements. The color style is deleted after update. is false; updating does not delete the style.
  3. Final Answer:

    All elements using Primary Blue update automatically. -> Option A
  4. Quick Check:

    Update color style = auto update all elements [OK]
Hint: Update color style updates all linked elements [OK]
Common Mistakes:
  • Thinking only new elements update
  • Believing manual change is needed after update
  • Confusing update with deletion
4. You tried to update a color style, but the elements did not change color. What is the most likely reason?
medium
A. You updated the wrong color style name.
B. Figma does not support updating color styles.
C. The elements are not using the color style but have fixed colors.
D. You need to restart Figma to see changes.

Solution

  1. Step 1: Identify why elements don't update

    If elements have fixed colors (not linked to a color style), updating the style won't affect them.
  2. Step 2: Evaluate other options

    You updated the wrong color style name. could be possible but less likely if you are sure of the style name. Figma does not support updating color styles. is false; Figma supports updates. You need to restart Figma to see changes. is unnecessary.
  3. Final Answer:

    The elements are not using the color style but have fixed colors. -> Option C
  4. Quick Check:

    Fixed colors ignore style updates [OK]
Hint: Check if elements use style or fixed color [OK]
Common Mistakes:
  • Assuming Figma needs restart
  • Confusing style update support
  • Not verifying element color source
5. You have a design with multiple color styles for buttons: Primary, Secondary, and Accent. You want to change all buttons to a new shade of blue without changing other elements. What is the best approach?
hard
A. Manually change the fill color of each button individually.
B. Create a new color style named Button Blue and apply it to all buttons, then update it as needed.
C. Update the Primary, Secondary, and Accent color styles to the new blue shade.
D. Delete all existing color styles and create new ones.

Solution

  1. Step 1: Understand the goal

    You want to change button colors without affecting other elements using existing styles.
  2. Step 2: Evaluate options

    Update the Primary, Secondary, and Accent color styles to the new blue shade. changes all elements using those styles, not just buttons. Manually change the fill color of each button individually. is manual and inefficient. Delete all existing color styles and create new ones. is disruptive. Create a new color style named Button Blue and apply it to all buttons, then update it as needed. creates a dedicated style for buttons, allowing easy updates without affecting others.
  3. Final Answer:

    Create a new color style named Button Blue and apply it to all buttons, then update it as needed. -> Option B
  4. Quick Check:

    Use dedicated color style for buttons [OK]
Hint: Use dedicated color style for buttons to isolate changes [OK]
Common Mistakes:
  • Updating shared styles affecting unrelated elements
  • Changing colors manually one by one
  • Deleting styles unnecessarily
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard