b8180d9f6d41dc708a2f249ba892cbca311e7a06
jcasper
  Mon Feb 27 11:38:55 2023 -0800
Adding transparency support for colors refs #30569

diff --git src/hg/poster/finPoster/finPoster.c src/hg/poster/finPoster/finPoster.c
index 23a34d8..fffc0b7 100644
--- src/hg/poster/finPoster/finPoster.c
+++ src/hg/poster/finPoster/finPoster.c
@@ -59,34 +59,34 @@
 
 /* Duplicons file from Evan Eichler. */
 char *dupliconsFile = "segDupesBuild34.txt";
 
 /* Ensemble gene predictions. */
 char *ensemblFile = "ensembl.txt";
 
 /* Noncoding RNA predictions. */
 char *rnaGeneFile = "ncrna-ncbi34.gff";
 
 /* Unresolved dupe output. */
 FILE *dupeFile;
 char *dupeFileName = "dupes.out";
 
 /* Some colors. */
-struct rgbColor rgbRed = {240,0,0};
-struct rgbColor rgbRedOrange = {240, 100, 0};
-struct rgbColor rgbYellow = {255, 255, 0};
-static struct rgbColor blueGene = { 0, 0, 160};
+struct rgbColor rgbRed = {240,0,0,255};
+struct rgbColor rgbRedOrange = {240, 100, 0, 255};
+struct rgbColor rgbYellow = {255, 255, 0, 255};
+static struct rgbColor blueGene = { 0, 0, 160, 255};
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "finPoster - Search database info for making finished\n"
   "human genome poster.\n"
   "usage:\n"
   "   finPoster chrM chrN ...\n"
   "Note - you'll need to edit the source to use different data\n");
 }
 
 struct chromGaps
 /* Placeholder for obsolete structure. */
     {
@@ -286,34 +286,34 @@
 }
 
 void getKnownGenes(struct chromGaps *cg, char *chrom, 
 	struct sqlConnection *conn, FILE *f, 
 	struct hash *dupHash, struct hash *resolvedDupHash, 
         struct hash *diseaseHash, struct hash *orthoHash,
 	struct hash *weedHash) 
 /* Get info on known genes. */
 {
 int rowOffset;
 struct sqlResult *sr;
 char **row;
 char query[256];
 struct genePred *gpList = NULL, *gp;
 char geneName[64];
-static struct rgbColor red = {200, 0, 0};
-static struct rgbColor lightRed = {255, 115, 115};
-static struct rgbColor blue = {0, 0, 180};
-static struct rgbColor lightBlue = {115, 115, 220};
+static struct rgbColor red = {200, 0, 0, 255};
+static struct rgbColor lightRed = {255, 115, 115, 255};
+static struct rgbColor blue = {0, 0, 180, 255};
+static struct rgbColor lightBlue = {115, 115, 220, 255};
 struct rgbColor *col;
 boolean keepGene;
 struct dlList *geneList = newDlList();
 struct dlNode *node;
 struct knownGene *kg;
 
 printf("  finding known genes for %s, chrom\n", chrom);
 
 /* Get list of known genes. */
 sr = hChromQuery(conn, "refGene", chrom, NULL, &rowOffset);
 while ((row = sqlNextRow(sr)) != NULL)
     {
     gp = genePredLoad(row + rowOffset);
     if (!hashLookup(weedHash, gp->name))
 	{
@@ -1008,56 +1008,56 @@
 int chromNum(char *chrom)
 /* Convert chrN to N,  also handle X and Y. */
 {
 char c;
 if (startsWith("chr", chrom))
     chrom += 3;
 c = chrom[0];
 if (c == 'X')
     return 23;
 if (c == 'Y')
     return 24;
 return atoi(chrom);
 }
 
 static struct rgbColor chromColorTable[] = {
-	{ 0,0, 0},
-	{ 255,204, 204},  /* light red */
-	{ 204,0, 0},      /* med red */
-	{ 255,0, 0},      /* bright red */
-	{ 255,102,0},     /* bright orange */
-	{ 255,153,0},     /* yellow orange */
-	{ 255,0,204},     /* magenta */
-	{ 255,255,204},   /* light yellow  */
-	{ 255,255,153},   /* med yellow */
-	{ 255,255,0},     /* bright yellow*/
-	{ 0,255,0},       /*bt gr*/
-	{ 204,255,0},     /* yellow green */
-	{ 102,102,0},     /* dark  green*/
-	{ 204,255,255},   /*lt cyan*/
-	{ 153,204,204},   /* gray cyan */
-	{ 0,255,255},     /*med cyan*/
-	{ 153,204,255},   /*light med blue */
-	{ 102,153,255},   /* med blue */
-	{ 0,0 ,204},      /* deep blue */
-	{ 204,153,255},   /*lt violet*/
-	{ 204,051,255},   /* med violet */
-	{ 153,0,204},     /* dark violet */
-	{ 204,204,204},   /* light gray */
-	{ 153,153,153},   /* med gray */
-	{ 102,102,102},   /* dark gray */
-	{ 255,255,255},   /* black */
+	{ 0,0, 0,255},
+	{ 255,204, 204,255},  /* light red */
+	{ 204,0, 0,255},      /* med red */
+	{ 255,0, 0,255},      /* bright red */
+	{ 255,102,0,255},     /* bright orange */
+	{ 255,153,0,255},     /* yellow orange */
+	{ 255,0,204,255},     /* magenta */
+	{ 255,255,204,255},   /* light yellow  */
+	{ 255,255,153,255},   /* med yellow */
+	{ 255,255,0,255},     /* bright yellow*/
+	{ 0,255,0,255},       /*bt gr*/
+	{ 204,255,0,255},     /* yellow green */
+	{ 102,102,0,255},     /* dark  green*/
+	{ 204,255,255,255},   /*lt cyan*/
+	{ 153,204,204,255},   /* gray cyan */
+	{ 0,255,255,255},     /*med cyan*/
+	{ 153,204,255,255},   /*light med blue */
+	{ 102,153,255,255},   /* med blue */
+	{ 0,0 ,204,255},      /* deep blue */
+	{ 204,153,255,255},   /*lt violet*/
+	{ 204,051,255,255},   /* med violet */
+	{ 153,0,204,255},     /* dark violet */
+	{ 204,204,204,255},   /* light gray */
+	{ 153,153,153,255},   /* med gray */
+	{ 102,102,102,255},   /* dark gray */
+	{ 255,255,255,255},   /* black */
 };
 
 struct rgbColor *chromColor(char *chrom)
 /* Return color for chromosome. */
 {
 int ix = chromNum(chrom);
 assert(ix < ArraySize(chromColorTable));
 return &chromColorTable[ix];
 }
 
 void getSynteny(struct chromGaps *cg, char *chrom, struct sqlConnection *conn, FILE *f)
 /* Read synteny file and put relevant parts in output */
 {
 struct sqlResult *sr;
 char **row;