I am trying to figure out a way to take a sphere in my scene and set the color of the sphere to a variable. How can I achieve this? I would also like it to update so for example, if a button is pressed and the variable changes to a different color then the sphere's color will change too.
Here is my markup for the sphere:
<a-sphere id="eleId" class="head" scale="0.3 0.3 0.3" position="0 1.5 -1"></a-sphere>
What I would like is to set the color of that sphere to a variable called color. How can I achieve this?