]> granicus.if.org Git - graphviz/commitdiff
Update mkcolors.awk to output less-deprecated HTML
authorMark Hansen <markhansen@google.com>
Mon, 22 Mar 2021 10:14:02 +0000 (21:14 +1100)
committerMark Hansen <markhansen@google.com>
Mon, 22 Mar 2021 10:14:27 +0000 (21:14 +1100)
Allows removing some warnings about bgcolor and font tags.

doc/infosrc/mkcolors.awk

index 5d13bcc4e3f8fa4867577605d658c40d3412a982..a8b95eb3e7184dbee6128c7e77ab0f1da77da57a 100644 (file)
@@ -6,8 +6,8 @@ function value (r, g, b) {
 }
 function putColor (n, r, g, b, v)
 {
-  printf ("<td bgcolor=\"#%02x%02x%02x\" title=\"#%02x%02x%02x\">",r,g,b,r,g,b); 
-  if (v < 0.51) printf ("<font color=\"white\">%s</font>", n);
+  printf ("<td style=\"background-color: #%02x%02x%02x;\" title=\"#%02x%02x%02x\">",r,g,b,r,g,b);
+  if (v < 0.51) printf ("<span style=\"color: white;\">%s</span>", n);
   else printf ("%s", n);
   printf ("</td>\n");
 }
@@ -37,5 +37,5 @@ BEGIN {
 }
 END {
   if (idx != 0) printf ("</tr>\n");
-  printf ("</table><HR>\n");
+  printf ("</table>\n");
 }