changeset 2269:cd4a9eeeb9e6

special case- white picks the center-top px
author drewp@bigasterisk.com
date Mon, 29 May 2023 13:21:14 -0700
parents 094e6b84b291
children b51c74da9d35
files light9/web/floating_color_picker.ts
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/floating_color_picker.ts	Mon May 29 13:20:46 2023 -0700
+++ b/light9/web/floating_color_picker.ts	Mon May 29 13:21:14 2023 -0700
@@ -82,6 +82,11 @@
       throw new Error("no match");
     }
 
+    log("col", col);
+    if (col == "#ffffff") {
+      return new RainbowCoord(400 / 2, 0);
+    }
+
     let bright = color(col).value(1).hex();
     let r = parseInt(bright.slice(1, 3), 16),
       g = parseInt(bright.slice(3, 5), 16),