async function* setColorOnVisibility(c, visibility) {
do {
colors.set(c, false);
await visibility();
colors.set(c, true);
for (const e of colors) {
if (e[1]) {
if (mutable color !== e[0]) {
mutable color = e[0];
if (e[0] === c) yield c;
}
break;
}
}
await Promises.delay(1000);
} while (true);
}