# HG changeset patch # User drewp@bigasterisk.com # Date 1685386080 25200 # Node ID 18d6bdd422f2354fa5b7d6bccd4ffa1b6b0417f7 # Parent 74b4acd3dde083dc57d1b4d861f7b776629932f7 update after boost diff -r 74b4acd3dde0 -r 18d6bdd422f2 light9/web/light9-color-picker.ts --- a/light9/web/light9-color-picker.ts Mon May 29 11:47:35 2023 -0700 +++ b/light9/web/light9-color-picker.ts Mon May 29 11:48:00 2023 -0700 @@ -63,9 +63,7 @@ this.setColor(this.color); } if (changedProperties.has("value") || changedProperties.has("hueSatColor")) { - this.color = color(this.hueSatColor) - .value(this.value / 255) - .hex(); + this.updateColorFromHSV(); this.dispatchEvent(new CustomEvent("input", { detail: { value: this.color } })); @@ -75,6 +73,12 @@ } } + private updateColorFromHSV() { + this.color = color(this.hueSatColor) + .value(this.value / 255) + .hex(); + } + private onVSliderChange(ev: CustomEvent) { this.value = ev.detail.value; } @@ -93,6 +97,7 @@ if (this.value < (20 as int8)) { log("boost"); this.value = 255 as int8; + this.updateColorFromHSV(); } pickerFloat.startPick(new ClientCoord(ev.clientX, ev.clientY), this.color, (hsc: string) => { this.hueSatColor = hsc;