8593c40cb74ab6ee9f2318056626305d9d9544d3 braney Fri Apr 10 12:54:44 2026 -0700 Fix color picker from code review, refs #37329, refs #20460 - Replace Spectrum JS color picker with native HTML5 color input, matching existing Hi-C picker - Color saved on form submit, not immediately via AJAX - Add checkbox to enable/disable color override; auto-checks when user picks a color - Gate color picker behind hg.conf showColorPicker=on (off by default) - Only show picker for non-composite tracks that support it: bed, bigBed, genePred, bigGenePred, wig, bigWig, rmsk, interact, bigInteract, bigLolly, vcfTabix, vcf - Add colorFromCart calls to interact, lolly, vcf phased, and pgSnp drawing code - Revert hui.js Spectrum changes from cfeb4d4 (no longer needed) - Use htmlColorForCode()/htmlColorToRGB() from htmlColor.h instead of hand-rolled hex parsing in colorFromCart Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> diff --git src/hg/hgTracks/interactTrack.c src/hg/hgTracks/interactTrack.c index bcb151905b9..f9e4a2e3aed 100644 --- src/hg/hgTracks/interactTrack.c +++ src/hg/hgTracks/interactTrack.c @@ -661,30 +661,31 @@ // Draw items struct hash *footHash = hashNew(0); // track feet so we can override color to black struct hash *footHashOther = hashNew(0); // has for items on other chrom for (inter = (struct interact *)tg->items; inter; inter = inter->next) { char *otherChrom = interactOtherChrom(inter); safef(itemBuf, sizeof itemBuf, "%s", inter->name); char *statusBuf = interactMouseover(inter, otherChrom); // Pick colors #define MG_LIGHT_MAGENTA 0xffffbbff #define MG_LIGHT_GRAY 0xff909090 color = interactItemColor(tg, inter, hvg, scoreMin, scoreMax); + color = colorFromCart(tg, color); if (vis == tvDense && otherChrom && color == MG_BLACK) // use highlight color for other chrom items in dense mode color = MG_LIGHT_MAGENTA; int peakColor = (color == MG_BLACK || tg->colorShades) ? MG_LIGHT_MAGENTA : MG_LIGHT_GRAY; if (otherChrom) { // different chromosomes // draw below same chrom items, if any drawOtherChromItem(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis, draw, inter, tInfo, statusBuf, peakColor, highlightColor, drawUp, doDashes, itemBuf, footHashOther); continue; } // Else, draw same chromosome interaction