3c079f1ab5ff66233574d8c5eff421698fe6b741
angie
  Mon Aug 18 11:51:58 2014 -0700
Revert "Checking in changes to make 'spectrum' (aka 'useScore') actually work on any pair of color/altColor settings.  It used to be that only shadesOfGray, shadesOfBrown and shadesOfSea worked, leaving most cases to be shadesOfGray.  I have sat on these changes for months.  I am also checking in ifdef'd out code to calc the shade on the fly, rather than relaying on track->colorShades set of precomputed 10 shades.  The only reason this code is not used is that it would require changing many many places/uses of colorShades.  Since I am bein laid off, it seems inappropriate to make this more dramatic change at this time."
This reverts commit a4adfa326bf8bec73020ee1a8aa0cb6251ea8663.

refs #13833

diff --git src/hg/hgTracks/bedTrack.c src/hg/hgTracks/bedTrack.c
index 3b3dd41..dc7f6c6 100644
--- src/hg/hgTracks/bedTrack.c
+++ src/hg/hgTracks/bedTrack.c
@@ -499,34 +499,34 @@
 int x2 = round((e-winStart)*scale) + xOff;
 int w = x2 - x1;
 if (w < 1)
     w = 1;
 struct trackDb *tdb = tg->tdb;
 int scoreMin = atoi(trackDbSettingClosestToHomeOrDefault(tdb, "scoreMin", "0"));
 int scoreMax = atoi(trackDbSettingClosestToHomeOrDefault(tdb, "scoreMax", "1000"));
 char *directUrl = trackDbSetting(tdb, "directUrl");
 boolean withHgsid = (trackDbSetting(tdb, "hgsid") != NULL);
 boolean thickDrawItem = (trackDbSetting(tdb, "thickDrawItem") != NULL);
 
 if (tg->itemColor != NULL)
     {
     color = tg->itemColor(tg, bed, hvg);
     }
-else
+else if (tg->colorShades)
     {
     adjustBedScoreGrayLevel(tdb, bed, scoreMin, scoreMax);
-    color = colorBySpectrumOrDefault(hvg,tg,grayInRange(bed->score, scoreMin, scoreMax),color);
+    color = tg->colorShades[grayInRange(bed->score, scoreMin, scoreMax)];
     }
 /*	Keep the item at least 4 pixels wide at all viewpoints */
 if (thickDrawItem && (w < 4))
     {
     x1 -= ((5-w) >> 1);
     w = 4;
     x2 = x1 + w;
     }
 if (color)
     {
     hvGfxBox(hvg, x1, y, w, heightPer, color);
     if (tg->drawName && vis != tvSquish)
 	{
 	/* Clip here so that text will tend to be more visible... */
 	char *s = tg->itemName(tg, bed);