d19b85083618569a8b3400a8d17a3d2028ef223d
lrnassar
  Tue Sep 29 15:38:31 2026 -0700
The itemRgb doc said a color setting "in the same stanza" loses to an explicit itemRgb on, which is narrower than bedItemRgb() behaves: both settings go through trackDbSetting(), which walks the parent chain, and the two lookups are independent, so a parent's itemRgb on beats a color set on the child itself. Reworded that and the matching colorFields sentence, and added the changes.html row this should have had. Caught by CR of 64adf565f28. refs #36212

diff --git src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
index 77fa9a20c91..ddf0a6cc56b 100644
--- src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
+++ src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
@@ -2283,38 +2283,40 @@
     at least 9 standard bed fields, this setting can be used to activate
     item coloring using the value in the ninth field, <code>itemRgb</code>. The
     value of the  item field must be an R,G,B triplet.  When loaded
     into a table, this field appears as an integer with the RGB values
     in specific bits of the integer. To observe this field, specify the type as,
      <code>type bigBed 9</code>, or, <code>type bigBed 9+</code>, for additional
     <A HREF="../../../FAQ/FAQformat.html#format1" target="_blank">non-standard columns</A>, 
     in the trackDb stanza for the bigBed file.</P>
     <P>Note that the display of color is affected by the <code>maxItems</code> option.
     When the track is zoomed to the point that the number of items to display
     exceeds <code>maxItems</code>, the track is forced into dense mode and the items
     are drawn from the bigBed summary in the default track color rather than using
     the <code>itemRgb column</code>.
   </P>
     <P>Whether the items are drawn from the <code>itemRgb</code> column also depends on
-    the <A onclick="jumpTo(this)" href="#color"><code>color</code></A> setting:</P>
+    the <A onclick="jumpTo(this)" href="#color"><code>color</code></A> setting. Both
+    settings are inherited from a track's <code>parent</code>, and an explicit
+    <code>itemRgb</code> wins wherever it is set:</P>
     <ul>
     <li><code>itemRgb on</code>: items take the colors in the file. A <code>color</code>
-    setting in the same stanza still colors the track label, but it does not override
-    the items.</li>
+    setting still colors the track label, but it does not override the items.</li>
     <li><code>itemRgb off</code>: items take the <code>color</code> setting, or black if
     there is none.</li>
-    <li><code>color</code> alone: items take the <code>color</code> setting.</li>
+    <li><code>color</code> with no <code>itemRgb</code>: items take the <code>color</code>
+    setting.</li>
     <li>Neither setting: items take the colors in the file. This is the default on
     genome.ucsc.edu.</li>
     </ul>
     <P><B>Example:</B></P>
     <pre>   itemRgb on</pre>
 </DIV>
 
 <DIV class="colorFields"><span class="types bigBed bigGenePred"></span>
     <div class="format">
         <code>colorFields default="&lt;label&gt;" &lt;fieldName1&gt;="&lt;label1&gt;" &lt;fieldName2&gt;="&lt;label2&gt;" ...</code>
     </div>
     <P>
     Enables a <b>Color by:</b> dropdown in the track controls that lets the user switch
     among multiple pre-computed color schemes without leaving the track display.
     </P>
@@ -2323,32 +2325,32 @@
     extra bigBed field (defined in the track's <code>.as</code> file) that contains a
     pre-computed <code>R,G,B</code> color string, the same format as the standard
     <A onclick="jumpTo(this)" href="#itemRgb">itemRgb</A> field.  The label in double
     quotes is shown in the dropdown; if omitted, a label is derived automatically by
     stripping a leading <code>colorBy</code> prefix and replacing underscores with spaces.
     </P>
     <P>
     The special name <code>default</code> (with an optional label) represents the track's
     existing <code>itemRgb</code> field (column 9) and is placed first in the dropdown.
     When no <code>default=</code> entry is given, an unlabeled &quot;Default&quot; option
     is added automatically.
     </P>
     <P>
     Item coloring must be active for <code>colorFields</code> to work. It is active by
     default on bigBed tracks with more than 9 fields. It is suppressed by
-    <code>itemRgb off</code>, or by a <code>color</code> setting in a stanza that does not
-    also say <code>itemRgb on</code>. The currently
+    <code>itemRgb off</code>, or by a <code>color</code> setting when neither the track nor
+    its parent says <code>itemRgb on</code>. The currently
     selected scheme is stored in the cart variable <code>&lt;trackName&gt;.colorField</code>.
     When a non-default scheme is active, the track long label gains a
     <em>(Coloring by: &lt;label&gt;)</em> suffix.
     </P>
     <P><B>Example:</B></P>
     <pre>
     colorFields default="Kozak strength" colorByEvidence="Evidence type" colorByHlaClass="HLA class"
     </pre>
     <P>This creates a three-option dropdown. <code>colorByEvidence</code> and
     <code>colorByHlaClass</code> must be extra fields in the bigBed whose values are
     <code>R,G,B</code> strings.</P>
 </DIV>
 
 <DIV class="maxItems"><span class="types bed bigBed broadPeak psl"></span>
 <div class="format"><code>maxItems &lt;integer&gt;</code></div>