Cannot change color in every step

I have forked the create_scatter.js.
I added a behavior caller “color_change.js”, very simple randomly changes the color of the agent at each step in my understanding.
Could someone please let me know what I am doing wrong. The agents always appear red and dont change, though in the RawData I cann see the changes in the rgb values for each step.

Hi Abenari,

You’re basically there. Instead of using the “color” property, set “rgb” on the agent. The color property takes in a string value, while rgb takes in an array and sets the agents color. Make sure to remove “color” from the agent, as it will override the rgb setting.


Alternatively you can provide the RGB values as a string to the color property.

This is a tad confusing, having two properties that can determine the visualization, and something we probably want to clear up. For more on built-in fields you can visit the docs