[MPlayer-dev-eng] A patch for new subtitle colors

Federico Kereki fkereki at gmail.com
Sat Jun 23 19:47:19 CEST 2012


Hi!

This patch allows for a few new CSS colors, some of which I happened to
find in some downloaded subtitles. I also arranged the colors in
alphabetical order, to better match the list at the W3
site<http://www.w3.org/TR/css3-color/#svg-color%20>
.

Best regards,
F.Kereki




> diff -Naur subassconvert.c.original subassconvert.c
--- subassconvert.c.original    2012-06-23 10:55:31.959899314 -0300
+++ subassconvert.c     2012-06-23 14:33:38.491802703 -0300
@@ -93,13 +93,29 @@
     const char *s;
     uint32_t v;
 } subrip_web_colors[] = {
-    /* 16 named HTML colors in BGR format */
-    {"red",     0x0000ff}, {"blue",   0xff0000}, {"lime",   0x00ff00},
-    {"aqua",    0xffff00}, {"purple", 0x800080}, {"yellow", 0x00ffff},
-    {"fuchsia", 0xff00ff}, {"white",  0xffffff}, {"gray",   0x808080},
-    {"maroon",  0x000080}, {"olive",  0x008080}, {"black",  0x000000},
-    {"silver",  0xc0c0c0}, {"teal",   0x808000}, {"green",  0x008000},
-    {"navy",    0x800000}
+    /* Named CSS3 colors in BGR format; a subset of those
+       at http://www.w3.org/TR/css3-color/#svg-color */
+    {"aqua",    0xffff00},
+    {"black",   0x000000},
+    {"blue",    0xff0000},
+    {"cyan",    0xffff00},
+    {"fuchsia", 0xff00ff},
+    {"gray",    0x808080},
+    {"green",   0x008000},
+    {"grey",    0x808080},
+    {"lime",    0x00ff00},
+    {"magenta", 0xff00ff},
+    {"maroon",  0x000080},
+    {"navy",    0x800000},
+    {"olive",   0x008080},
+    {"orange",  0x00a5ff},
+    {"pink",    0xcbc0ff},
+    {"purple",  0x800080},
+    {"red",     0x0000ff},
+    {"silver",  0xc0c0c0},
+    {"teal",    0x808000},
+    {"white",   0xffffff},
+    {"yellow",  0x00ffff},
 };

 #define SUBRIP_MAX_STACKED_FONT_TAGS    16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subassconvert.c.patch
Type: application/octet-stream
Size: 1404 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120623/0f828442/attachment.obj>


More information about the MPlayer-dev-eng mailing list