c43e813a238e650c17e8dee441653d9037a86e18
kate
  Sun Apr 15 21:51:04 2018 -0700
Fix problem with r,g,b color specs.  Now also supports #RRGGBB anand 16 HTML color names. refs #21109

diff --git src/inc/basicBed.h src/inc/basicBed.h
index 4d89dc1..44655f6 100644
--- src/inc/basicBed.h
+++ src/inc/basicBed.h
@@ -258,30 +258,35 @@
 
 struct bed *bedCommaInN(char **pS, struct bed *ret, int fieldCount);
 /* Create a bed out of a comma separated string looking for fieldCount
  * fields. This will fill in ret if non-null, otherwise will return a
  * new bed */
 
 struct hash *readBedToBinKeeper(char *sizeFileName, char *bedFileName, int wordCount);
 /* Read a list of beds and return results in hash of binKeeper structure for fast query
  * See also bedsIntoKeeperHash, which takes the beds read into a list already, but
  * dispenses with the need for the sizeFile. */
 
 int bedParseRgb(char *itemRgb);
 /*	parse a string: "r,g,b" into three unsigned char values
 	returned as 24 bit number, or -1 for failure */
 
+int bedParseColor(char *colorSpec);
+/* Parse an HTML color string, a  string of 3 comma-sep unsigned color values 0-255, 
+ * or a 6-digit hex string  preceded by #. 
+ * O/w return unsigned integer value.  Return -1 on error */
+
 long long bedTotalSize(struct bed *bedList);
 /* Add together sizes of all beds in list. */
 
 int bedSameStrandOverlap(struct bed *a, struct bed *b);
 /* Return amount of block-level overlap on same strand between a and b */
 
 boolean bedExactMatch(struct bed *oldBed, struct bed *newBed);
 /* Return TRUE if it's an exact match. */
 
 boolean bedCompatibleExtension(struct bed *oldBed, struct bed *newBed);
 /* Return TRUE if newBed is a compatible extension of oldBed, meaning
  * all internal exons and all introns of old bed are contained, in the 
  * same order in the new bed. */
 
 struct rbTree *bedToRangeTree(struct bed *bed);