viewof makeColours = {
const button1 = html`<button value="red">Generate red colours</button>`;
const button2 = html`<button value="blue">Generate blue colours</button>`;
const control = html`${button1}${button2}<i>this can take a few seconds to respond</i>`;
button1.onclick = e => {
e && e.preventDefault();
control.value = button1.value;
control.dispatchEvent(new CustomEvent('input'));
};
button2.onclick = e => {
e && e.preventDefault();
control.value = button2.value;
control.dispatchEvent(new CustomEvent('input'));
};
return control;
}