0c4b26c76ee09cadbe1a444016f2c41df33906f9
braney
  Thu Apr 9 15:48:53 2026 -0700
Fix color picker and quickLift issues from code review, refs #37329

Color picker: fix [object Object] bug by calling .toHexString() on spectrum
result, use htmlColor.h instead of hand-rolled hex parsing, show "color
override active" status when override is set.  quickLift: remove redundant
quickLiftResolveTable call in genericBedClick, move hFindSplitTable into
else branch where it's needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

diff --git src/hg/js/hui.js src/hg/js/hui.js
index f129c051434..cc6091710b4 100644
--- src/hg/js/hui.js
+++ src/hg/js/hui.js
@@ -1589,65 +1589,63 @@
         parentEl.appendChild(colorPickerContainer);
     } else {
         alert("Must supply parentNode to append color picker");
         throw new Error();
     }
     let opt = {
         hideAfterPaletteSelect: true,
         color: $(inpSpec).val(),
         showPalette: true,
         showInput: true,
         showSelectionPalette: true,
         showInitial: true,
         preferredFormat: "hex",
         localStorageKey: "genomebrowser",
         change: function() {
-            let color = $(inpSpec).spectrum("get");
+            let color = $(inpSpec).spectrum("get").toHexString();
             $(inpText).val(color);
             saveHlColor(color, trackName);
-            if (statusSpan) statusSpan.textContent = "";
+            if (statusSpan) statusSpan.textContent = "color override active";
         },
     };
     $(inpSpec).spectrum(opt);
 
     // update the color picker if you change the input box
     $(inpText).on("change", function() {
         $(inpSpec).spectrum("set", $(inpText).val());
         saveHlColor($(inpText).val(), trackName);
-        if (statusSpan) statusSpan.textContent = "";
+        if (statusSpan) statusSpan.textContent = "color override active";
     });
     let statusSpan = document.createElement("span");
     statusSpan.style = "margin-left: 10px; font-style: italic";
     colorPickerContainer.appendChild(statusSpan);
 
-    // show initial status if itemRgb is active and no color override is set
-    if (hasItemRgb && !hasOverride) {
-        statusSpan.textContent = "items are currently being colored per item";
+    // show initial status when a color override is active
+    if (hasOverride) {
+        statusSpan.textContent = "color override active";
     }
 
     // Restore the default on Reset link click
     $(inpResetLink).on("click", function() {
         $(inpText).val(defaultColor);
         $(inpSpec).spectrum("set", defaultColor);
         if (cartVar === "hlColor") {
             saveHlColor(defaultColor, trackName);
         } else {
             // clear the cart variable so itemRgb and other per-item coloring is restored
             saveHlColor("", trackName);
-            if (hasItemRgb) {
-                statusSpan.textContent = "items are currently being colored per item";
-            }
+            statusSpan.textContent = "";
         }
     });
     $(inpSpec).spectrum("set", $(inpText).val());
 }
 
 function superUiSetAllTracks(onlyVisible) {
     /* called when user clicks the 'Apply to all' buttons: sets all viz dropdowns to the #superSubViz value */
     let newVal = $('#superSubViz').val();
     var selects = document.querySelectorAll('#superTrackTable select');
     for (var i = 0; i < selects.length; i++) {
         var sel = selects[i];
         if (sel.id==="superSubViz")
             continue;
         if (onlyVisible && sel.value === 'hide')
             continue;