98d6fb247a79e7a09337fdfb0bbdaaa6e4b3e0ba
jcasper
  Fri Oct 23 15:53:01 2020 -0700
Fixing color=0,0,0 being ignored for hic tracks, refs #26312

diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c
index cc5b50b..d3ed8a1 100644
--- src/hg/lib/customTrack.c
+++ src/hg/lib/customTrack.c
@@ -501,31 +501,31 @@
 fprintf(f, "\t%s='%s'", "description", tdb->longLabel);
 hashMayRemove(tdb->settingsHash, "description");
 
 if (tdb->url != NULL && tdb->url[0])
     fprintf(f, "\t%s='%s'", "url", tdb->url);
 hashMayRemove(tdb->settingsHash, "url");
 if (tdb->visibility != def->visibility)
     fprintf(f, "\t%s='%d'", "visibility", tdb->visibility);
 hashMayRemove(tdb->settingsHash, "visibility");
 if (tdb->useScore != def->useScore)
     fprintf(f, "\t%s='%d'", "useScore", tdb->useScore);
 hashMayRemove(tdb->settingsHash, "useScore");
 if (tdb->priority != def->priority)
     fprintf(f, "\t%s='%.3f'", "priority", tdb->priority);
 hashMayRemove(tdb->settingsHash, "priority");
-if (tdb->colorR != def->colorR || tdb->colorG != def->colorG || tdb->colorB != def->colorB)
+if (tdb->colorR != def->colorR || tdb->colorG != def->colorG || tdb->colorB != def->colorB || sameOk(tdb->type, "hic"))
     fprintf(f, "\t%s='%d,%d,%d'", "color", tdb->colorR, tdb->colorG, tdb->colorB);
 hashMayRemove(tdb->settingsHash, "color");
 if (tdb->altColorR != def->altColorR || tdb->altColorG != def->altColorG
 	|| tdb->altColorB != def->altColorB)
     fprintf(f, "\t%s='%d,%d,%d'", "altColor", tdb->altColorR, tdb->altColorG, tdb->altColorB);
 hashMayRemove(tdb->settingsHash, "altColor");
 
 if (tdb->settings && (strlen(tdb->settings) > 0))
     saveSettings(f, hashToRaString(tdb->settingsHash));
 fputc('\n', f);
 fflush(f);
 if (ferror(f))
     errnoAbort("Write error to %s", fileName);
 trackDbFree(&def);
 }