Changing line color on mouse click

Aha, yes. I knew that would be a stupid one and it was. Using a text component as ISI with letter height 0.1instead of 10.

So now it runs, but the cards don’t change colour when clicked.

I have the code component set to both, but I am aware of the issuesre using RGB as per post 9 here How to make polygons change color when pressed - #2 by Becca

Below is the js but I’m scared to edit it as it works (mostly).

for (var thisPolygon, _pj_c = 0, _pj_a = polygons, _pj_b = _pj_a.length; (_pj_c < _pj_b); _pj_c += 1) {
    thisPolygon = _pj_a[_pj_c];
    if (mouse.isPressedIn(thisPolygon)) {
        thisClickTime = clickClock.getTime();
        if (((thisClickTime - lastClickTime) > bufferTime)) {
            if ((thisPolygon.fillColor === "red")) {
                thisPolygon.fillColor = "white";
            } else {
                thisPolygon.fillColor = "red";
            }
        }
        lastClickTime = thisClickTime;
    }
}

I’m part way…

for (var thisPolygon, _pj_c = 0, _pj_a = polygons, _pj_b = _pj_a.length; (_pj_c < _pj_b); _pj_c += 1) {
    thisPolygon = _pj_a[_pj_c];
    if (mouse.isPressedIn(thisPolygon)) {
        thisClickTime = clickClock.getTime();
        if (((thisClickTime - lastClickTime) > bufferTime)) {
            if ((thisPolygon.fillColor['_rgb'][2] === 0)) {
                fillColor = new util.Color("white");
            } 
else {
                thisPolygon.fillColor = "red";
            }
        }
        lastClickTime = thisClickTime;
    }
}

but appreciate something needs to switch here too

 thisPolygon.fillColor = "red";