[FFmpeg-devel] [PATCH] XPM encoder nad decoder
Paul B Mahol
onemda at gmail.com
Thu Jun 28 19:28:47 CEST 2012
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
doc/general.texi | 2 +
libavcodec/Makefile | 2 +
libavcodec/allcodecs.c | 1 +
libavcodec/avcodec.h | 1 +
libavcodec/xpmdec.c | 180 ++++++++++++++++
libavcodec/xpmenc.c | 154 ++++++++++++++
libavformat/img2.c | 1 +
libavformat/img2enc.c | 2 +-
libavutil/parseutils.c | 544 +++++++++++++++++++++++++++++++++++++++++++++++-
9 files changed, 881 insertions(+), 6 deletions(-)
create mode 100644 libavcodec/xpmdec.c
create mode 100644 libavcodec/xpmenc.c
diff --git a/doc/general.texi b/doc/general.texi
index a55aa37..361f4a5 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -422,6 +422,8 @@ following image formats are supported:
@tab Targa (.TGA) image format
@item XBM @tab X @tab X
@tab X BitMap image format
+ at item XPM @tab X @tab X
+ @tab X PixMap image format
@item XWD @tab X @tab X
@tab X Window Dump image format
@end multitable
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 95bcb17..4931a2a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -509,6 +509,8 @@ OBJS-$(CONFIG_XBIN_DECODER) += bintext.o cga_data.o
OBJS-$(CONFIG_XBM_DECODER) += xbmdec.o
OBJS-$(CONFIG_XBM_ENCODER) += xbmenc.o
OBJS-$(CONFIG_XL_DECODER) += xl.o
+OBJS-$(CONFIG_XPM_DECODER) += xpmdec.o
+OBJS-$(CONFIG_XPM_ENCODER) += xpmenc.o
OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o
OBJS-$(CONFIG_XSUB_ENCODER) += xsubenc.o
OBJS-$(CONFIG_XWD_DECODER) += xwddec.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 8c2bd2b..e7edc62 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -255,6 +255,7 @@ void avcodec_register_all(void)
REGISTER_DECODER (XAN_WC4, xan_wc4);
REGISTER_ENCDEC (XBM, xbm);
REGISTER_DECODER (XL, xl);
+ REGISTER_ENCDEC (XPM, xpm);
REGISTER_ENCDEC (XWD, xwd);
REGISTER_ENCDEC (Y41P, y41p);
REGISTER_DECODER (YOP, yop);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 625bdc6..8a392b2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -270,6 +270,7 @@ enum CodecID {
CODEC_ID_V408 = MKBETAG('V','4','0','8'),
CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
CODEC_ID_SANM = MKBETAG('S','A','N','M'),
+ CODEC_ID_XPM = MKBETAG('X','P','M',' '),
/* various PCM "codecs" */
CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c
new file mode 100644
index 0000000..f4a0e90
--- /dev/null
+++ b/libavcodec/xpmdec.c
@@ -0,0 +1,180 @@
+/*
+ * XPM image format
+ *
+ * Copyright (c) 2012 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/parseutils.h"
+#include "avcodec.h"
+
+typedef struct XPMContext {
+ AVFrame picture;
+ uint8_t *pixels;
+ int pixels_size;
+} XPMDecContext;
+
+static av_cold int xpm_decode_init(AVCodecContext *avctx)
+{
+ XPMDecContext *x = avctx->priv_data;
+
+ avcodec_get_frame_defaults(&x->picture);
+ avctx->coded_frame = &x->picture;
+
+ return 0;
+}
+
+static int ascii2index(const uint8_t *cpixel, int cpp)
+{
+ const uint8_t *p = cpixel;
+ int n = 0, m = 1, i;
+
+ for (i = 0; i < cpp; i++) {
+ if (*p < ' ' || *p > '~')
+ return AVERROR_INVALIDDATA;
+ n += (*p++ - ' ') * m;
+ m *= 94;
+ }
+ return n;
+}
+
+static int xpm_decode_frame(AVCodecContext *avctx, void *data,
+ int *data_size, AVPacket *avpkt)
+{
+ XPMDecContext *x = avctx->priv_data;
+ AVFrame *p = avctx->coded_frame;
+ const uint8_t *end, *ptr = avpkt->data;
+ int ncolors, cpp, ret, i, j;
+ uint8_t *dst, rgba[4];
+
+ end = avpkt->data + avpkt->size;
+ if (memcmp(ptr, "/* XPM */", 9)) {
+ av_log(avctx, AV_LOG_ERROR, "missing signature\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ ptr += strcspn(ptr, "\"");
+ if (sscanf(ptr, "\"%u %u %u %u\",",
+ &avctx->width, &avctx->height, &ncolors, &cpp) != 4) {
+ av_log(avctx, AV_LOG_ERROR, "missing image parameters\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ if (ncolors <= 0 || cpp <= 0) {
+ av_log(avctx, AV_LOG_ERROR, "invalid number of colors or chars per pixel\n");
+ return AVERROR_INVALIDDATA;
+ }
+ if (ncolors > 256) {
+ av_log(avctx, AV_LOG_ERROR, "unsupported number of colors\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
+ if (cpp != 1 && cpp != 2) {
+ av_log(avctx, AV_LOG_ERROR, "unsupported number of chars per pixel\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
+ avctx->pix_fmt = PIX_FMT_PAL8;
+
+ if (p->data[0])
+ avctx->release_buffer(avctx, p);
+
+ p->reference = 0;
+ if ((ret = avctx->get_buffer(avctx, p)) < 0)
+ return ret;
+
+ av_fast_padded_malloc(&x->pixels, &x->pixels_size, cpp == 2 ? 94 * 94 : 94);
+ if (!x->pixels)
+ return AVERROR(ENOMEM);
+
+ ptr += strcspn(ptr, ",") + 1;
+ for (i = 0; i < ncolors; i++) {
+ const uint8_t *index;
+ int len;
+
+ ptr += strcspn(ptr, "\"") + 1;
+ if (ptr + cpp > end)
+ return AVERROR_INVALIDDATA;
+ index = ptr;
+ ptr += cpp;
+
+ ptr = strstr(ptr, "c ");
+ if (ptr)
+ ptr += 2;
+ else
+ return AVERROR_INVALIDDATA;
+
+ len = strcspn(ptr, "\" ");
+ if ((ret = av_parse_color(rgba, ptr, len, avctx)) < 0)
+ return ret;
+ *(p->data[1] + i * 4 ) = rgba[2];
+ *(p->data[1] + i * 4 + 1) = rgba[1];
+ *(p->data[1] + i * 4 + 2) = rgba[0];
+ *(p->data[1] + i * 4 + 3) = rgba[3];
+
+ if ((ret = ascii2index(index, cpp)) < 0)
+ return ret;
+ x->pixels[ret] = i;
+
+ ptr += strcspn(ptr, ",") + 1;
+ }
+
+ for (i = 0; i < avctx->height; i++) {
+ dst = p->data[0] + i * p->linesize[0];
+ ptr += strcspn(ptr, "\"") + 1;
+ for (j = 0; j < avctx->width; j++) {
+ if (ptr + cpp > end)
+ return AVERROR_INVALIDDATA;
+ *dst++ = x->pixels[ascii2index(ptr, cpp)];
+ ptr += cpp;
+ }
+ ptr += strcspn(ptr, ",") + 1;
+ }
+
+ p->key_frame = 1;
+ p->pict_type = AV_PICTURE_TYPE_I;
+
+ *data_size = sizeof(AVFrame);
+ *(AVFrame *)data = *p;
+
+ return avpkt->size;
+}
+
+static av_cold int xpm_decode_close(AVCodecContext *avctx)
+{
+ XPMDecContext *x = avctx->priv_data;
+
+ if (avctx->coded_frame->data[0])
+ avctx->release_buffer(avctx, avctx->coded_frame);
+
+ av_freep(&x->pixels);
+
+ return 0;
+}
+
+AVCodec ff_xpm_decoder = {
+ .name = "xpm",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_XPM,
+ .priv_data_size = sizeof(XPMDecContext),
+ .init = xpm_decode_init,
+ .close = xpm_decode_close,
+ .decode = xpm_decode_frame,
+ .capabilities = CODEC_CAP_DR1,
+ .long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image"),
+};
diff --git a/libavcodec/xpmenc.c b/libavcodec/xpmenc.c
new file mode 100644
index 0000000..2ef502c
--- /dev/null
+++ b/libavcodec/xpmenc.c
@@ -0,0 +1,154 @@
+/*
+ * XPM image format
+ *
+ * Copyright (c) 2012 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/intreadwrite.h"
+#include "avcodec.h"
+#include "internal.h"
+
+typedef struct XPMEncContext {
+ AVFrame picture;
+ char *cpixels;
+ int cpixels_size;
+} XPMEncContext;
+
+static av_cold int xpm_encode_init(AVCodecContext *avctx)
+{
+ XPMEncContext *x = avctx->priv_data;
+
+ avcodec_get_frame_defaults(&x->picture);
+ avctx->coded_frame = &x->picture;
+
+ return 0;
+}
+
+static void index2ascii(int index, int cpp, char *cpixel)
+{
+ int n = index, charnum, i;
+ char *p = cpixel;
+
+ for (i = 0; i < cpp; i++) {
+ charnum = n % ('z' - '#');
+ n = n / ('z' - '#');
+ *p++ = '#' + charnum;
+ }
+ *p = '\0';
+}
+
+static int xpm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
+ const AVFrame *p, int *got_packet)
+{
+ XPMEncContext *x = avctx->priv_data;
+ int i, j, ret, ncolors, cpp, size;
+ uint8_t *buf, *ptr;
+
+ switch (avctx->pix_fmt) {
+ case PIX_FMT_RGB4_BYTE:
+ case PIX_FMT_BGR4_BYTE:
+ ncolors = 16;
+ cpp = 1;
+ break;
+ case PIX_FMT_PAL8:
+ case PIX_FMT_RGB8:
+ case PIX_FMT_BGR8:
+ ncolors = 256;
+ cpp = 2;
+ break;
+ default:
+ av_log(avctx, AV_LOG_INFO, "unsupported pixel format\n");
+ return AVERROR(EINVAL);
+ }
+
+ av_fast_padded_malloc(&x->cpixels, &x->cpixels_size, ncolors * (cpp + 1));
+ if (!x->cpixels)
+ return AVERROR(ENOMEM);
+
+ size = 12 + 25 + 50 + ncolors * (cpp + 16) + avctx->height * (avctx->width * cpp + 5);
+ if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0) {
+ av_freep(&x->cpixels);
+ return ret;
+ }
+
+ buf = pkt->data;
+ ptr = p->data[0];
+
+ buf += snprintf(buf, 12, "/* XPM */\n");
+ buf += snprintf(buf, 25, "static char *out[] = {\n");
+ buf += snprintf(buf, 50, "\"%u %u %u %u\",\n", avctx->width, avctx->height, ncolors, cpp);
+
+ for (i = 0; i < ncolors; i++) {
+ uint8_t red, green, blue, alpha;
+ uint32_t val;
+
+ val = AV_RN32A(p->data[1] + i * 4);
+ alpha = (val >> 24) & 0xFF;
+ red = (val >> 16) & 0xFF;
+ green = (val >> 8) & 0xFF;
+ blue = val & 0xFF;
+
+ index2ascii(i, cpp, x->cpixels + i * (cpp + 1));
+ buf += snprintf(buf, 2 + cpp, "\"%s", x->cpixels + i * (cpp + 1));
+ if (alpha)
+ buf += snprintf(buf, 16, " c #%02X%02X%02X\",\n", red, green, blue);
+ else
+ buf += snprintf(buf, 12, " c none\",\n");
+ }
+ for (i = 0; i < avctx->height; i++) {
+ buf += snprintf(buf, 2, "\"");
+ for (j = 0; j < avctx->width; j++) {
+ buf += snprintf(buf, 1 + cpp, "%s", x->cpixels + *ptr++ * (cpp + 1));
+ }
+ ptr += p->linesize[0] - avctx->width;
+ buf += snprintf(buf, 4, "\",\n");
+ }
+ buf += snprintf(buf, 4, "};\n");
+
+ pkt->size = buf - pkt->data;
+ pkt->flags |= AV_PKT_FLAG_KEY;
+ *got_packet = 1;
+ return 0;
+}
+
+static av_cold int xpm_encode_close(AVCodecContext *avctx)
+{
+ XPMEncContext *x = avctx->priv_data;
+
+ av_freep(&x->cpixels);
+
+ return 0;
+}
+
+AVCodec ff_xpm_encoder = {
+ .name = "xpm",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_XPM,
+ .priv_data_size = sizeof(XPMEncContext),
+ .init = xpm_encode_init,
+ .encode2 = xpm_encode_frame,
+ .close = xpm_encode_close,
+ .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_RGB8,
+ PIX_FMT_BGR8,
+ PIX_FMT_RGB4_BYTE,
+ PIX_FMT_BGR4_BYTE,
+ PIX_FMT_PAL8,
+ PIX_FMT_NONE },
+ .long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image"),
+};
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 47dbb62..3dd83a2 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -73,6 +73,7 @@ static const IdStrMap img_tags[] = {
{ CODEC_ID_EXR , "exr"},
{ CODEC_ID_PICTOR , "pic"},
{ CODEC_ID_XBM , "xbm"},
+ { CODEC_ID_XPM , "xpm"},
{ CODEC_ID_XWD , "xwd"},
{ CODEC_ID_NONE , NULL}
};
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 58b4655..7eaa385 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -154,7 +154,7 @@ AVOutputFormat ff_image2_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("image2 sequence"),
.extensions = "bmp,dpx,jls,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png,"
"ppm,sgi,tga,tif,tiff,jp2,j2c,xwd,sun,ras,rs,im1,im8,im24,"
- "sunras,xbm",
+ "sunras,xbm,xpm",
.priv_data_size = sizeof(VideoMuxData),
.video_codec = CODEC_ID_MJPEG,
.write_header = write_header,
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 795236c..983538f 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -184,89 +184,483 @@ typedef struct {
static const ColorEntry color_table[] = {
{ "AliceBlue", { 0xF0, 0xF8, 0xFF } },
{ "AntiqueWhite", { 0xFA, 0xEB, 0xD7 } },
+ { "AntiqueWhite1", { 0xFF, 0xEF, 0xDB } },
+ { "AntiqueWhite2", { 0xEE, 0xDF, 0xCC } },
+ { "AntiqueWhite3", { 0xCD, 0xC0, 0xB0 } },
+ { "AntiqueWhite4", { 0x8B, 0x83, 0x78 } },
{ "Aqua", { 0x00, 0xFF, 0xFF } },
{ "Aquamarine", { 0x7F, 0xFF, 0xD4 } },
+ { "Aquamarine1", { 0x7F, 0xFF, 0xD4 } },
+ { "Aquamarine2", { 0x76, 0xEE, 0xC6 } },
+ { "Aquamarine3", { 0x66, 0xCD, 0xAA } },
+ { "Aquamarine4", { 0x45, 0x8B, 0x74 } },
{ "Azure", { 0xF0, 0xFF, 0xFF } },
+ { "Azure1", { 0xF0, 0xFF, 0xFF } },
+ { "Azure2", { 0xE0, 0xEE, 0xEE } },
+ { "Azure3", { 0xC1, 0xCD, 0xCD } },
+ { "Azure4", { 0x83, 0x8B, 0x8B } },
{ "Beige", { 0xF5, 0xF5, 0xDC } },
{ "Bisque", { 0xFF, 0xE4, 0xC4 } },
+ { "Bisque1", { 0xFF, 0xE4, 0xC4 } },
+ { "Bisque2", { 0xEE, 0xD5, 0xB7 } },
+ { "Bisque3", { 0xCD, 0xB7, 0x9E } },
+ { "Bisque4", { 0x8B, 0x7D, 0x6B } },
{ "Black", { 0x00, 0x00, 0x00 } },
{ "BlanchedAlmond", { 0xFF, 0xEB, 0xCD } },
{ "Blue", { 0x00, 0x00, 0xFF } },
+ { "Blue1", { 0x00, 0x00, 0xFF } },
+ { "Blue2", { 0x00, 0x00, 0xEE } },
+ { "Blue3", { 0x00, 0x00, 0xCD } },
+ { "Blue4", { 0x00, 0x00, 0x8B } },
{ "BlueViolet", { 0x8A, 0x2B, 0xE2 } },
{ "Brown", { 0xA5, 0x2A, 0x2A } },
+ { "Brown1", { 0xFF, 0x40, 0x40 } },
+ { "Brown2", { 0xEE, 0x3B, 0x3B } },
+ { "Brown3", { 0xCD, 0x33, 0x33 } },
+ { "Brown4", { 0x8B, 0x23, 0x23 } },
{ "BurlyWood", { 0xDE, 0xB8, 0x87 } },
+ { "Burlywood1", { 0xFF, 0xD3, 0x9B } },
+ { "Burlywood2", { 0xEE, 0xC5, 0x91 } },
+ { "Burlywood3", { 0xCD, 0xAA, 0x7D } },
+ { "Burlywood4", { 0x8B, 0x73, 0x55 } },
{ "CadetBlue", { 0x5F, 0x9E, 0xA0 } },
+ { "CadetBlue1", { 0x98, 0xF5, 0xFF } },
+ { "CadetBlue2", { 0x8E, 0xE5, 0xEE } },
+ { "CadetBlue3", { 0x7A, 0xC5, 0xCD } },
+ { "CadetBlue4", { 0x53, 0x86, 0x8B } },
{ "Chartreuse", { 0x7F, 0xFF, 0x00 } },
+ { "Chartreuse1", { 0x7F, 0xFF, 0x00 } },
+ { "Chartreuse2", { 0x76, 0xEE, 0x00 } },
+ { "Chartreuse3", { 0x66, 0xCD, 0x00 } },
+ { "Chartreuse4", { 0x45, 0x8B, 0x00 } },
{ "Chocolate", { 0xD2, 0x69, 0x1E } },
+ { "Chocolate1", { 0xFF, 0x7F, 0x24 } },
+ { "Chocolate2", { 0xEE, 0x76, 0x21 } },
+ { "Chocolate3", { 0xCD, 0x66, 0x1D } },
+ { "Chocolate4", { 0x8B, 0x45, 0x13 } },
{ "Coral", { 0xFF, 0x7F, 0x50 } },
+ { "Coral1", { 0xFF, 0x72, 0x56 } },
+ { "Coral2", { 0xEE, 0x6A, 0x50 } },
+ { "Coral3", { 0xCD, 0x5B, 0x45 } },
+ { "Coral4", { 0x8B, 0x3E, 0x2F } },
{ "CornflowerBlue", { 0x64, 0x95, 0xED } },
{ "Cornsilk", { 0xFF, 0xF8, 0xDC } },
+ { "Cornsilk1", { 0xFF, 0xF8, 0xDC } },
+ { "Cornsilk2", { 0xEE, 0xE8, 0xCD } },
+ { "Cornsilk3", { 0xCD, 0xC8, 0xB1 } },
+ { "Cornsilk4", { 0x8B, 0x88, 0x78 } },
{ "Crimson", { 0xDC, 0x14, 0x3C } },
{ "Cyan", { 0x00, 0xFF, 0xFF } },
+ { "Cyan1", { 0x00, 0xFF, 0xFF } },
+ { "Cyan2", { 0x00, 0xEE, 0xEE } },
+ { "Cyan3", { 0x00, 0xCD, 0xCD } },
+ { "Cyan4", { 0x00, 0x8B, 0x8B } },
{ "DarkBlue", { 0x00, 0x00, 0x8B } },
{ "DarkCyan", { 0x00, 0x8B, 0x8B } },
{ "DarkGoldenRod", { 0xB8, 0x86, 0x0B } },
+ { "DarkGoldenrod1", { 0xFF, 0xB9, 0x0F } },
+ { "DarkGoldenrod2", { 0xEE, 0xAD, 0x0E } },
+ { "DarkGoldenrod3", { 0xCD, 0x95, 0x0C } },
+ { "DarkGoldenrod4", { 0x8B, 0x65, 0x08 } },
{ "DarkGray", { 0xA9, 0xA9, 0xA9 } },
{ "DarkGreen", { 0x00, 0x64, 0x00 } },
+ { "DarkGrey", { 0xA9, 0xA9, 0xA9 } },
{ "DarkKhaki", { 0xBD, 0xB7, 0x6B } },
{ "DarkMagenta", { 0x8B, 0x00, 0x8B } },
{ "DarkOliveGreen", { 0x55, 0x6B, 0x2F } },
- { "Darkorange", { 0xFF, 0x8C, 0x00 } },
+ { "DarkOliveGreen1", { 0xCA, 0xFF, 0x70 } },
+ { "DarkOliveGreen2", { 0xBC, 0xEE, 0x68 } },
+ { "DarkOliveGreen3", { 0xA2, 0xCD, 0x5A } },
+ { "DarkOliveGreen4", { 0x6E, 0x8B, 0x3D } },
+ { "DarkOrange", { 0xFF, 0x8C, 0x00 } },
+ { "DarkOrange1", { 0xFF, 0x7F, 0x00 } },
+ { "DarkOrange2", { 0xEE, 0x76, 0x00 } },
+ { "DarkOrange3", { 0xCD, 0x66, 0x00 } },
+ { "DarkOrange4", { 0x8B, 0x45, 0x00 } },
{ "DarkOrchid", { 0x99, 0x32, 0xCC } },
+ { "DarkOrchid1", { 0xBF, 0x3E, 0xFF } },
+ { "DarkOrchid2", { 0xB2, 0x3A, 0xEE } },
+ { "DarkOrchid3", { 0x9A, 0x32, 0xCD } },
+ { "DarkOrchid4", { 0x68, 0x22, 0x8B } },
{ "DarkRed", { 0x8B, 0x00, 0x00 } },
{ "DarkSalmon", { 0xE9, 0x96, 0x7A } },
{ "DarkSeaGreen", { 0x8F, 0xBC, 0x8F } },
+ { "DarkSeaGreen1", { 0xC1, 0xFF, 0xC1 } },
+ { "DarkSeaGreen2", { 0xB4, 0xEE, 0xB4 } },
+ { "DarkSeaGreen3", { 0x9B, 0xCD, 0x9B } },
+ { "DarkSeaGreen4", { 0x69, 0x8B, 0x69 } },
{ "DarkSlateBlue", { 0x48, 0x3D, 0x8B } },
{ "DarkSlateGray", { 0x2F, 0x4F, 0x4F } },
+ { "DarkSlateGray1", { 0x97, 0xFF, 0xFF } },
+ { "DarkSlateGray2", { 0x8D, 0xEE, 0xEE } },
+ { "DarkSlateGray3", { 0x79, 0xCD, 0xCD } },
+ { "DarkSlateGray4", { 0x52, 0x8B, 0x8B } },
+ { "DarkSlateGrey", { 0x2F, 0x4F, 0x4F } },
{ "DarkTurquoise", { 0x00, 0xCE, 0xD1 } },
{ "DarkViolet", { 0x94, 0x00, 0xD3 } },
{ "DeepPink", { 0xFF, 0x14, 0x93 } },
+ { "DeepPink1", { 0xFF, 0x14, 0x93 } },
+ { "DeepPink2", { 0xEE, 0x12, 0x89 } },
+ { "DeepPink3", { 0xCD, 0x10, 0x76 } },
+ { "DeepPink4", { 0x8B, 0x0A, 0x50 } },
{ "DeepSkyBlue", { 0x00, 0xBF, 0xFF } },
+ { "DeepSkyBlue1", { 0x00, 0xBF, 0xFF } },
+ { "DeepSkyBlue2", { 0x00, 0xB2, 0xEE } },
+ { "DeepSkyBlue3", { 0x00, 0x9A, 0xCD } },
+ { "DeepSkyBlue4", { 0x00, 0x68, 0x8B } },
{ "DimGray", { 0x69, 0x69, 0x69 } },
+ { "DimGrey", { 0x69, 0x69, 0x69 } },
{ "DodgerBlue", { 0x1E, 0x90, 0xFF } },
+ { "DodgerBlue1", { 0x1E, 0x90, 0xFF } },
+ { "DodgerBlue2", { 0x1C, 0x86, 0xEE } },
+ { "DodgerBlue3", { 0x18, 0x74, 0xCD } },
+ { "DodgerBlue4", { 0x10, 0x4E, 0x8B } },
{ "FireBrick", { 0xB2, 0x22, 0x22 } },
+ { "Firebrick1", { 0xFF, 0x30, 0x30 } },
+ { "Firebrick2", { 0xEE, 0x2C, 0x2C } },
+ { "Firebrick3", { 0xCD, 0x26, 0x26 } },
+ { "Firebrick4", { 0x8B, 0x1A, 0x1A } },
{ "FloralWhite", { 0xFF, 0xFA, 0xF0 } },
{ "ForestGreen", { 0x22, 0x8B, 0x22 } },
+ { "Fractal", { 0x80, 0x80, 0x80 } },
{ "Fuchsia", { 0xFF, 0x00, 0xFF } },
{ "Gainsboro", { 0xDC, 0xDC, 0xDC } },
{ "GhostWhite", { 0xF8, 0xF8, 0xFF } },
{ "Gold", { 0xFF, 0xD7, 0x00 } },
+ { "Gold1", { 0xFF, 0xD7, 0x00 } },
+ { "Gold2", { 0xEE, 0xC9, 0x00 } },
+ { "Gold3", { 0xCD, 0xAD, 0x00 } },
+ { "Gold4", { 0x8B, 0x75, 0x00 } },
{ "GoldenRod", { 0xDA, 0xA5, 0x20 } },
- { "Gray", { 0x80, 0x80, 0x80 } },
- { "Green", { 0x00, 0x80, 0x00 } },
+ { "Goldenrod1", { 0xFF, 0xC1, 0x25 } },
+ { "Goldenrod2", { 0xEE, 0xB4, 0x22 } },
+ { "Goldenrod3", { 0xCD, 0x9B, 0x1D } },
+ { "Goldenrod4", { 0x8B, 0x69, 0x14 } },
+ { "Gray", { 0xBE, 0xBE, 0xBE } },
+ { "Gray0", { 0x00, 0x00, 0x00 } },
+ { "Gray1", { 0x03, 0x03, 0x03 } },
+ { "Gray10", { 0x1A, 0x1A, 0x1A } },
+ { "Gray100", { 0xFF, 0xFF, 0xFF } },
+ { "Gray100", { 0xFF, 0xFF, 0xFF } },
+ { "Gray11", { 0x1C, 0x1C, 0x1C } },
+ { "Gray12", { 0x1F, 0x1F, 0x1F } },
+ { "Gray13", { 0x21, 0x21, 0x21 } },
+ { "Gray14", { 0x24, 0x24, 0x24 } },
+ { "Gray15", { 0x26, 0x26, 0x26 } },
+ { "Gray16", { 0x29, 0x29, 0x29 } },
+ { "Gray17", { 0x2B, 0x2B, 0x2B } },
+ { "Gray18", { 0x2E, 0x2E, 0x2E } },
+ { "Gray19", { 0x30, 0x30, 0x30 } },
+ { "Gray2", { 0x05, 0x05, 0x05 } },
+ { "Gray20", { 0x33, 0x33, 0x33 } },
+ { "Gray21", { 0x36, 0x36, 0x36 } },
+ { "Gray22", { 0x38, 0x38, 0x38 } },
+ { "Gray23", { 0x3B, 0x3B, 0x3B } },
+ { "Gray24", { 0x3D, 0x3D, 0x3D } },
+ { "Gray25", { 0x40, 0x40, 0x40 } },
+ { "Gray26", { 0x42, 0x42, 0x42 } },
+ { "Gray27", { 0x45, 0x45, 0x45 } },
+ { "Gray28", { 0x47, 0x47, 0x47 } },
+ { "Gray29", { 0x4A, 0x4A, 0x4A } },
+ { "Gray3", { 0x08, 0x08, 0x08 } },
+ { "Gray30", { 0x4D, 0x4D, 0x4D } },
+ { "Gray31", { 0x4F, 0x4F, 0x4F } },
+ { "Gray32", { 0x52, 0x52, 0x52 } },
+ { "Gray33", { 0x54, 0x54, 0x54 } },
+ { "Gray34", { 0x57, 0x57, 0x57 } },
+ { "Gray35", { 0x59, 0x59, 0x59 } },
+ { "Gray36", { 0x5C, 0x5C, 0x5C } },
+ { "Gray37", { 0x5E, 0x5E, 0x5E } },
+ { "Gray38", { 0x61, 0x61, 0x61 } },
+ { "Gray39", { 0x63, 0x63, 0x63 } },
+ { "Gray4", { 0x0A, 0x0A, 0x0A } },
+ { "Gray40", { 0x66, 0x66, 0x66 } },
+ { "Gray41", { 0x69, 0x69, 0x69 } },
+ { "Gray42", { 0x6B, 0x6B, 0x6B } },
+ { "Gray43", { 0x6E, 0x6E, 0x6E } },
+ { "Gray44", { 0x70, 0x70, 0x70 } },
+ { "Gray45", { 0x73, 0x73, 0x73 } },
+ { "Gray46", { 0x75, 0x75, 0x75 } },
+ { "Gray47", { 0x78, 0x78, 0x78 } },
+ { "Gray48", { 0x7A, 0x7A, 0x7A } },
+ { "Gray49", { 0x7D, 0x7D, 0x7D } },
+ { "Gray5", { 0x0D, 0x0D, 0x0D } },
+ { "Gray50", { 0x7F, 0x7F, 0x7F } },
+ { "Gray51", { 0x82, 0x82, 0x82 } },
+ { "Gray52", { 0x85, 0x85, 0x85 } },
+ { "Gray53", { 0x87, 0x87, 0x87 } },
+ { "Gray54", { 0x8A, 0x8A, 0x8A } },
+ { "Gray55", { 0x8C, 0x8C, 0x8C } },
+ { "Gray56", { 0x8F, 0x8F, 0x8F } },
+ { "Gray57", { 0x91, 0x91, 0x91 } },
+ { "Gray58", { 0x94, 0x94, 0x94 } },
+ { "Gray59", { 0x96, 0x96, 0x96 } },
+ { "Gray6", { 0x0F, 0x0F, 0x0F } },
+ { "Gray60", { 0x99, 0x99, 0x99 } },
+ { "Gray61", { 0x9C, 0x9C, 0x9C } },
+ { "Gray62", { 0x9E, 0x9E, 0x9E } },
+ { "Gray63", { 0xA1, 0xA1, 0xA1 } },
+ { "Gray64", { 0xA3, 0xA3, 0xA3 } },
+ { "Gray65", { 0xA6, 0xA6, 0xA6 } },
+ { "Gray66", { 0xA8, 0xA8, 0xA8 } },
+ { "Gray67", { 0xAB, 0xAB, 0xAB } },
+ { "Gray68", { 0xAD, 0xAD, 0xAD } },
+ { "Gray69", { 0xB0, 0xB0, 0xB0 } },
+ { "Gray7", { 0x12, 0x12, 0x12 } },
+ { "Gray70", { 0xB3, 0xB3, 0xB3 } },
+ { "Gray71", { 0xB5, 0xB5, 0xB5 } },
+ { "Gray72", { 0xB8, 0xB8, 0xB8 } },
+ { "Gray73", { 0xBA, 0xBA, 0xBA } },
+ { "Gray74", { 0xBD, 0xBD, 0xBD } },
+ { "Gray75", { 0xBF, 0xBF, 0xBF } },
+ { "Gray76", { 0xC2, 0xC2, 0xC2 } },
+ { "Gray77", { 0xC4, 0xC4, 0xC4 } },
+ { "Gray78", { 0xC7, 0xC7, 0xC7 } },
+ { "Gray79", { 0xC9, 0xC9, 0xC9 } },
+ { "Gray8", { 0x14, 0x14, 0x14 } },
+ { "Gray80", { 0xCC, 0xCC, 0xCC } },
+ { "Gray81", { 0xCF, 0xCF, 0xCF } },
+ { "Gray82", { 0xD1, 0xD1, 0xD1 } },
+ { "Gray83", { 0xD4, 0xD4, 0xD4 } },
+ { "Gray84", { 0xD6, 0xD6, 0xD6 } },
+ { "Gray85", { 0xD9, 0xD9, 0xD9 } },
+ { "Gray86", { 0xDB, 0xDB, 0xDB } },
+ { "Gray87", { 0xDE, 0xDE, 0xDE } },
+ { "Gray88", { 0xE0, 0xE0, 0xE0 } },
+ { "Gray89", { 0xE3, 0xE3, 0xE3 } },
+ { "Gray9", { 0x17, 0x17, 0x17 } },
+ { "Gray90", { 0xE5, 0xE5, 0xE5 } },
+ { "Gray91", { 0xE8, 0xE8, 0xE8 } },
+ { "Gray92", { 0xEB, 0xEB, 0xEB } },
+ { "Gray93", { 0xED, 0xED, 0xED } },
+ { "Gray94", { 0xF0, 0xF0, 0xF0 } },
+ { "Gray95", { 0xF2, 0xF2, 0xF2 } },
+ { "Gray96", { 0xF5, 0xF5, 0xF5 } },
+ { "Gray97", { 0xF7, 0xF7, 0xF7 } },
+ { "Gray98", { 0xFA, 0xFA, 0xFA } },
+ { "Gray99", { 0xFC, 0xFC, 0xFC } },
+ { "Green", { 0x00, 0xFF, 0x00 } },
+ { "Green1", { 0x00, 0xFF, 0x00 } },
+ { "Green2", { 0x00, 0xEE, 0x00 } },
+ { "Green3", { 0x00, 0xCD, 0x00 } },
+ { "Green4", { 0x00, 0x8B, 0x00 } },
{ "GreenYellow", { 0xAD, 0xFF, 0x2F } },
+ { "Grey", { 0xBE, 0xBE, 0xBE } },
+ { "Grey0", { 0x00, 0x00, 0x00 } },
+ { "Grey1", { 0x03, 0x03, 0x03 } },
+ { "Grey10", { 0x1A, 0x1A, 0x1A } },
+ { "Grey100", { 0xFF, 0xFF, 0xFF } },
+ { "Grey11", { 0x1C, 0x1C, 0x1C } },
+ { "Grey12", { 0x1F, 0x1F, 0x1F } },
+ { "Grey13", { 0x21, 0x21, 0x21 } },
+ { "Grey14", { 0x24, 0x24, 0x24 } },
+ { "Grey15", { 0x26, 0x26, 0x26 } },
+ { "Grey16", { 0x29, 0x29, 0x29 } },
+ { "Grey17", { 0x2B, 0x2B, 0x2B } },
+ { "Grey18", { 0x2E, 0x2E, 0x2E } },
+ { "Grey19", { 0x30, 0x30, 0x30 } },
+ { "Grey2", { 0x05, 0x05, 0x05 } },
+ { "Grey20", { 0x33, 0x33, 0x33 } },
+ { "Grey21", { 0x36, 0x36, 0x36 } },
+ { "Grey22", { 0x38, 0x38, 0x38 } },
+ { "Grey23", { 0x3B, 0x3B, 0x3B } },
+ { "Grey24", { 0x3D, 0x3D, 0x3D } },
+ { "Grey25", { 0x40, 0x40, 0x40 } },
+ { "Grey26", { 0x42, 0x42, 0x42 } },
+ { "Grey27", { 0x45, 0x45, 0x45 } },
+ { "Grey28", { 0x47, 0x47, 0x47 } },
+ { "Grey29", { 0x4A, 0x4A, 0x4A } },
+ { "Grey3", { 0x08, 0x08, 0x08 } },
+ { "Grey30", { 0x4D, 0x4D, 0x4D } },
+ { "Grey31", { 0x4F, 0x4F, 0x4F } },
+ { "Grey32", { 0x52, 0x52, 0x52 } },
+ { "Grey33", { 0x54, 0x54, 0x54 } },
+ { "Grey34", { 0x57, 0x57, 0x57 } },
+ { "Grey35", { 0x59, 0x59, 0x59 } },
+ { "Grey36", { 0x5C, 0x5C, 0x5C } },
+ { "Grey37", { 0x5E, 0x5E, 0x5E } },
+ { "Grey38", { 0x61, 0x61, 0x61 } },
+ { "Grey39", { 0x63, 0x63, 0x63 } },
+ { "Grey4", { 0x0A, 0x0A, 0x0A } },
+ { "Grey40", { 0x66, 0x66, 0x66 } },
+ { "Grey41", { 0x69, 0x69, 0x69 } },
+ { "Grey42", { 0x6B, 0x6B, 0x6B } },
+ { "Grey43", { 0x6E, 0x6E, 0x6E } },
+ { "Grey44", { 0x70, 0x70, 0x70 } },
+ { "Grey45", { 0x73, 0x73, 0x73 } },
+ { "Grey46", { 0x75, 0x75, 0x75 } },
+ { "Grey47", { 0x78, 0x78, 0x78 } },
+ { "Grey48", { 0x7A, 0x7A, 0x7A } },
+ { "Grey49", { 0x7D, 0x7D, 0x7D } },
+ { "Grey5", { 0x0D, 0x0D, 0x0D } },
+ { "Grey50", { 0x7F, 0x7F, 0x7F } },
+ { "Grey51", { 0x82, 0x82, 0x82 } },
+ { "Grey52", { 0x85, 0x85, 0x85 } },
+ { "Grey53", { 0x87, 0x87, 0x87 } },
+ { "Grey54", { 0x8A, 0x8A, 0x8A } },
+ { "Grey55", { 0x8C, 0x8C, 0x8C } },
+ { "Grey56", { 0x8F, 0x8F, 0x8F } },
+ { "Grey57", { 0x91, 0x91, 0x91 } },
+ { "Grey58", { 0x94, 0x94, 0x94 } },
+ { "Grey59", { 0x96, 0x96, 0x96 } },
+ { "Grey6", { 0x0F, 0x0F, 0x0F } },
+ { "Grey60", { 0x99, 0x99, 0x99 } },
+ { "Grey61", { 0x9C, 0x9C, 0x9C } },
+ { "Grey62", { 0x9E, 0x9E, 0x9E } },
+ { "Grey63", { 0xA1, 0xA1, 0xA1 } },
+ { "Grey64", { 0xA3, 0xA3, 0xA3 } },
+ { "Grey65", { 0xA6, 0xA6, 0xA6 } },
+ { "Grey66", { 0xA8, 0xA8, 0xA8 } },
+ { "Grey67", { 0xAB, 0xAB, 0xAB } },
+ { "Grey68", { 0xAD, 0xAD, 0xAD } },
+ { "Grey69", { 0xB0, 0xB0, 0xB0 } },
+ { "Grey7", { 0x12, 0x12, 0x12 } },
+ { "Grey70", { 0xB3, 0xB3, 0xB3 } },
+ { "Grey71", { 0xB5, 0xB5, 0xB5 } },
+ { "Grey72", { 0xB8, 0xB8, 0xB8 } },
+ { "Grey73", { 0xBA, 0xBA, 0xBA } },
+ { "Grey74", { 0xBD, 0xBD, 0xBD } },
+ { "Grey75", { 0xBF, 0xBF, 0xBF } },
+ { "Grey76", { 0xC2, 0xC2, 0xC2 } },
+ { "Grey77", { 0xC4, 0xC4, 0xC4 } },
+ { "Grey78", { 0xC7, 0xC7, 0xC7 } },
+ { "Grey79", { 0xC9, 0xC9, 0xC9 } },
+ { "Grey8", { 0x14, 0x14, 0x14 } },
+ { "Grey80", { 0xCC, 0xCC, 0xCC } },
+ { "Grey81", { 0xCF, 0xCF, 0xCF } },
+ { "Grey82", { 0xD1, 0xD1, 0xD1 } },
+ { "Grey83", { 0xD4, 0xD4, 0xD4 } },
+ { "Grey84", { 0xD6, 0xD6, 0xD6 } },
+ { "Grey85", { 0xD9, 0xD9, 0xD9 } },
+ { "Grey86", { 0xDB, 0xDB, 0xDB } },
+ { "Grey87", { 0xDE, 0xDE, 0xDE } },
+ { "Grey88", { 0xE0, 0xE0, 0xE0 } },
+ { "Grey89", { 0xE3, 0xE3, 0xE3 } },
+ { "Grey9", { 0x17, 0x17, 0x17 } },
+ { "Grey90", { 0xE5, 0xE5, 0xE5 } },
+ { "Grey91", { 0xE8, 0xE8, 0xE8 } },
+ { "Grey92", { 0xEB, 0xEB, 0xEB } },
+ { "Grey93", { 0xED, 0xED, 0xED } },
+ { "Grey94", { 0xF0, 0xF0, 0xF0 } },
+ { "Grey95", { 0xF2, 0xF2, 0xF2 } },
+ { "Grey96", { 0xF5, 0xF5, 0xF5 } },
+ { "Grey97", { 0xF7, 0xF7, 0xF7 } },
+ { "Grey98", { 0xFA, 0xFA, 0xFA } },
+ { "Grey99", { 0xFC, 0xFC, 0xFC } },
{ "HoneyDew", { 0xF0, 0xFF, 0xF0 } },
+ { "Honeydew1", { 0xF0, 0xFF, 0xF0 } },
+ { "Honeydew2", { 0xE0, 0xEE, 0xE0 } },
+ { "Honeydew3", { 0xC1, 0xCD, 0xC1 } },
+ { "Honeydew4", { 0x83, 0x8B, 0x83 } },
{ "HotPink", { 0xFF, 0x69, 0xB4 } },
+ { "HotPink1", { 0xFF, 0x6E, 0xB4 } },
+ { "HotPink2", { 0xEE, 0x6A, 0xA7 } },
+ { "HotPink3", { 0xCD, 0x60, 0x90 } },
+ { "HotPink4", { 0x8B, 0x3A, 0x62 } },
{ "IndianRed", { 0xCD, 0x5C, 0x5C } },
+ { "IndianRed1", { 0xFF, 0x6A, 0x6A } },
+ { "IndianRed2", { 0xEE, 0x63, 0x63 } },
+ { "IndianRed3", { 0xCD, 0x55, 0x55 } },
+ { "IndianRed4", { 0x8B, 0x3A, 0x3A } },
{ "Indigo", { 0x4B, 0x00, 0x82 } },
{ "Ivory", { 0xFF, 0xFF, 0xF0 } },
+ { "Ivory1", { 0xFF, 0xFF, 0xF0 } },
+ { "Ivory2", { 0xEE, 0xEE, 0xE0 } },
+ { "Ivory3", { 0xCD, 0xCD, 0xC1 } },
+ { "Ivory4", { 0x8B, 0x8B, 0x83 } },
{ "Khaki", { 0xF0, 0xE6, 0x8C } },
+ { "Khaki1", { 0xFF, 0xF6, 0x8F } },
+ { "Khaki2", { 0xEE, 0xE6, 0x85 } },
+ { "Khaki3", { 0xCD, 0xC6, 0x73 } },
+ { "Khaki4", { 0x8B, 0x86, 0x4E } },
{ "Lavender", { 0xE6, 0xE6, 0xFA } },
{ "LavenderBlush", { 0xFF, 0xF0, 0xF5 } },
+ { "LavenderBlush1", { 0xFF, 0xF0, 0xF5 } },
+ { "LavenderBlush2", { 0xEE, 0xE0, 0xE5 } },
+ { "LavenderBlush3", { 0xCD, 0xC1, 0xC5 } },
+ { "LavenderBlush4", { 0x8B, 0x83, 0x86 } },
{ "LawnGreen", { 0x7C, 0xFC, 0x00 } },
{ "LemonChiffon", { 0xFF, 0xFA, 0xCD } },
+ { "LemonChiffon1", { 0xFF, 0xFA, 0xCD } },
+ { "LemonChiffon2", { 0xEE, 0xE9, 0xBF } },
+ { "LemonChiffon3", { 0xCD, 0xC9, 0xA5 } },
+ { "LemonChiffon4", { 0x8B, 0x89, 0x70 } },
{ "LightBlue", { 0xAD, 0xD8, 0xE6 } },
+ { "LightBlue1", { 0xBF, 0xEF, 0xFF } },
+ { "LightBlue2", { 0xB2, 0xDF, 0xEE } },
+ { "LightBlue3", { 0x9A, 0xC0, 0xCD } },
+ { "LightBlue4", { 0x68, 0x83, 0x8B } },
{ "LightCoral", { 0xF0, 0x80, 0x80 } },
{ "LightCyan", { 0xE0, 0xFF, 0xFF } },
+ { "LightCyan1", { 0xE0, 0xFF, 0xFF } },
+ { "LightCyan2", { 0xD1, 0xEE, 0xEE } },
+ { "LightCyan3", { 0xB4, 0xCD, 0xCD } },
+ { "LightCyan4", { 0x7A, 0x8B, 0x8B } },
+ { "LightGoldenRod", { 0xEE, 0xDD, 0x82 } },
+ { "LightGoldenRod1", { 0xFF, 0xEC, 0x8B } },
+ { "LightGoldenRod2", { 0xEE, 0xDC, 0x82 } },
+ { "LightGoldenRod3", { 0xCD, 0xBE, 0x70 } },
+ { "LightGoldenRod4", { 0x8B, 0x81, 0x4C } },
{ "LightGoldenRodYellow", { 0xFA, 0xFA, 0xD2 } },
+ { "LightGray", { 0xD3, 0xD3, 0xD3 } },
{ "LightGreen", { 0x90, 0xEE, 0x90 } },
{ "LightGrey", { 0xD3, 0xD3, 0xD3 } },
{ "LightPink", { 0xFF, 0xB6, 0xC1 } },
+ { "LightPink1", { 0xFF, 0xAE, 0xB9 } },
+ { "LightPink2", { 0xEE, 0xA2, 0xAD } },
+ { "LightPink3", { 0xCD, 0x8C, 0x95 } },
+ { "LightPink4", { 0x8B, 0x5F, 0x65 } },
{ "LightSalmon", { 0xFF, 0xA0, 0x7A } },
+ { "LightSalmon1", { 0xFF, 0xA0, 0x7A } },
+ { "LightSalmon2", { 0xEE, 0x95, 0x72 } },
+ { "LightSalmon3", { 0xCD, 0x81, 0x62 } },
+ { "LightSalmon4", { 0x8B, 0x57, 0x42 } },
{ "LightSeaGreen", { 0x20, 0xB2, 0xAA } },
{ "LightSkyBlue", { 0x87, 0xCE, 0xFA } },
+ { "LightSkyBlue1", { 0xB0, 0xE2, 0xFF } },
+ { "LightSkyBlue2", { 0xA4, 0xD3, 0xEE } },
+ { "LightSkyBlue3", { 0x8D, 0xB6, 0xCD } },
+ { "LightSkyBlue4", { 0x60, 0x7B, 0x8B } },
+ { "LightSlateBlue", { 0x84, 0x70, 0xFF } },
{ "LightSlateGray", { 0x77, 0x88, 0x99 } },
+ { "LightSlateGrey", { 0x77, 0x88, 0x99 } },
{ "LightSteelBlue", { 0xB0, 0xC4, 0xDE } },
+ { "LightSteelBlue1", { 0xCA, 0xE1, 0xFF } },
+ { "LightSteelBlue2", { 0xBC, 0xD2, 0xEE } },
+ { "LightSteelBlue3", { 0xA2, 0xB5, 0xCD } },
+ { "LightSteelBlue4", { 0x6E, 0x7B, 0x8B } },
{ "LightYellow", { 0xFF, 0xFF, 0xE0 } },
+ { "LightYellow1", { 0xFF, 0xFF, 0xE0 } },
+ { "LightYellow2", { 0xEE, 0xEE, 0xD1 } },
+ { "LightYellow3", { 0xCD, 0xCD, 0xB4 } },
+ { "LightYellow4", { 0x8B, 0x8B, 0x7A } },
{ "Lime", { 0x00, 0xFF, 0x00 } },
{ "LimeGreen", { 0x32, 0xCD, 0x32 } },
{ "Linen", { 0xFA, 0xF0, 0xE6 } },
{ "Magenta", { 0xFF, 0x00, 0xFF } },
- { "Maroon", { 0x80, 0x00, 0x00 } },
+ { "Magenta1", { 0xFF, 0x00, 0xFF } },
+ { "Magenta2", { 0xEE, 0x00, 0xEE } },
+ { "Magenta3", { 0xCD, 0x00, 0xCD } },
+ { "Magenta4", { 0x8B, 0x00, 0x8B } },
+ { "Maroon", { 0xB0, 0x30, 0x60 } },
+ { "Maroon1", { 0xFF, 0x34, 0xB3 } },
+ { "Maroon2", { 0xEE, 0x30, 0xA7 } },
+ { "Maroon3", { 0xCD, 0x29, 0x90 } },
+ { "Maroon4", { 0x8B, 0x1C, 0x62 } },
{ "MediumAquaMarine", { 0x66, 0xCD, 0xAA } },
{ "MediumBlue", { 0x00, 0x00, 0xCD } },
+ { "MediumForestGreen", { 0x32, 0x81, 0x4B } },
+ { "MediumGoldenRod", { 0xD1, 0xC1, 0x66 } },
{ "MediumOrchid", { 0xBA, 0x55, 0xD3 } },
+ { "MediumOrchid1", { 0xE0, 0x66, 0xFF } },
+ { "MediumOrchid2", { 0xD1, 0x5F, 0xEE } },
+ { "MediumOrchid3", { 0xB4, 0x52, 0xCD } },
+ { "MediumOrchid4", { 0x7A, 0x37, 0x8B } },
{ "MediumPurple", { 0x93, 0x70, 0xD8 } },
+ { "MediumPurple1", { 0xAB, 0x82, 0xFF } },
+ { "MediumPurple2", { 0x9F, 0x79, 0xEE } },
+ { "MediumPurple3", { 0x89, 0x68, 0xCD } },
+ { "MediumPurple4", { 0x5D, 0x47, 0x8B } },
{ "MediumSeaGreen", { 0x3C, 0xB3, 0x71 } },
{ "MediumSlateBlue", { 0x7B, 0x68, 0xEE } },
{ "MediumSpringGreen", { 0x00, 0xFA, 0x9A } },
@@ -275,52 +669,187 @@ static const ColorEntry color_table[] = {
{ "MidnightBlue", { 0x19, 0x19, 0x70 } },
{ "MintCream", { 0xF5, 0xFF, 0xFA } },
{ "MistyRose", { 0xFF, 0xE4, 0xE1 } },
+ { "MistyRose1", { 0xFF, 0xE4, 0xE1 } },
+ { "MistyRose2", { 0xEE, 0xD5, 0xD2 } },
+ { "MistyRose3", { 0xCD, 0xB7, 0xB5 } },
+ { "MistyRose4", { 0x8B, 0x7D, 0x7B } },
{ "Moccasin", { 0xFF, 0xE4, 0xB5 } },
{ "NavajoWhite", { 0xFF, 0xDE, 0xAD } },
+ { "NavajoWhite1", { 0xFF, 0xDE, 0xAD } },
+ { "NavajoWhite2", { 0xEE, 0xCF, 0xA1 } },
+ { "NavajoWhite3", { 0xCD, 0xB3, 0x8B } },
+ { "NavajoWhite4", { 0x8B, 0x79, 0x5E } },
{ "Navy", { 0x00, 0x00, 0x80 } },
+ { "NavyBlue", { 0x00, 0x00, 0x80 } },
{ "OldLace", { 0xFD, 0xF5, 0xE6 } },
{ "Olive", { 0x80, 0x80, 0x00 } },
{ "OliveDrab", { 0x6B, 0x8E, 0x23 } },
+ { "OliveDrab1", { 0xC0, 0xFF, 0x3E } },
+ { "OliveDrab2", { 0xB3, 0xEE, 0x3A } },
+ { "OliveDrab3", { 0x9A, 0xCD, 0x32 } },
+ { "OliveDrab4", { 0x69, 0x8B, 0x22 } },
{ "Orange", { 0xFF, 0xA5, 0x00 } },
+ { "Orange1", { 0xFF, 0xA5, 0x00 } },
+ { "Orange2", { 0xEE, 0x9A, 0x00 } },
+ { "Orange3", { 0xCD, 0x85, 0x00 } },
+ { "Orange4", { 0x8B, 0x5A, 0x00 } },
{ "OrangeRed", { 0xFF, 0x45, 0x00 } },
+ { "OrangeRed1", { 0xFF, 0x45, 0x00 } },
+ { "OrangeRed2", { 0xEE, 0x40, 0x00 } },
+ { "OrangeRed3", { 0xCD, 0x37, 0x00 } },
+ { "OrangeRed4", { 0x8B, 0x25, 0x00 } },
{ "Orchid", { 0xDA, 0x70, 0xD6 } },
+ { "Orchid1", { 0xFF, 0x83, 0xFA } },
+ { "Orchid2", { 0xEE, 0x7A, 0xE9 } },
+ { "Orchid3", { 0xCD, 0x69, 0xC9 } },
+ { "Orchid4", { 0x8B, 0x47, 0x89 } },
{ "PaleGoldenRod", { 0xEE, 0xE8, 0xAA } },
{ "PaleGreen", { 0x98, 0xFB, 0x98 } },
+ { "PaleGreen1", { 0x9A, 0xFF, 0x9A } },
+ { "PaleGreen2", { 0x90, 0xEE, 0x90 } },
+ { "PaleGreen3", { 0x7C, 0xCD, 0x7C } },
+ { "PaleGreen4", { 0x54, 0x8B, 0x54 } },
{ "PaleTurquoise", { 0xAF, 0xEE, 0xEE } },
+ { "PaleTurquoise1", { 0xBB, 0xFF, 0xFF } },
+ { "PaleTurquoise2", { 0xAE, 0xEE, 0xEE } },
+ { "PaleTurquoise3", { 0x96, 0xCD, 0xCD } },
+ { "PaleTurquoise4", { 0x66, 0x8B, 0x8B } },
{ "PaleVioletRed", { 0xD8, 0x70, 0x93 } },
+ { "PaleVioletRed1", { 0xFF, 0x82, 0xAB } },
+ { "PaleVioletRed2", { 0xEE, 0x79, 0x9F } },
+ { "PaleVioletRed3", { 0xCD, 0x68, 0x89 } },
+ { "PaleVioletRed4", { 0x8B, 0x47, 0x5D } },
{ "PapayaWhip", { 0xFF, 0xEF, 0xD5 } },
{ "PeachPuff", { 0xFF, 0xDA, 0xB9 } },
+ { "PeachPuff1", { 0xFF, 0xDA, 0xB9 } },
+ { "PeachPuff2", { 0xEE, 0xCB, 0xAD } },
+ { "PeachPuff3", { 0xCD, 0xAF, 0x95 } },
+ { "PeachPuff4", { 0x8B, 0x77, 0x65 } },
{ "Peru", { 0xCD, 0x85, 0x3F } },
{ "Pink", { 0xFF, 0xC0, 0xCB } },
+ { "Pink1", { 0xFF, 0xB5, 0xC5 } },
+ { "Pink2", { 0xEE, 0xA9, 0xB8 } },
+ { "Pink3", { 0xCD, 0x91, 0x9E } },
+ { "Pink4", { 0x8B, 0x63, 0x6C } },
{ "Plum", { 0xDD, 0xA0, 0xDD } },
+ { "Plum1", { 0xFF, 0xBB, 0xFF } },
+ { "Plum2", { 0xEE, 0xAE, 0xEE } },
+ { "Plum3", { 0xCD, 0x96, 0xCD } },
+ { "Plum4", { 0x8B, 0x66, 0x8B } },
{ "PowderBlue", { 0xB0, 0xE0, 0xE6 } },
- { "Purple", { 0x80, 0x00, 0x80 } },
+ { "Purple", { 0xA0, 0x20, 0xF0 } },
+ { "Purple1", { 0x9B, 0x30, 0xFF } },
+ { "Purple2", { 0x91, 0x2C, 0xEE } },
+ { "Purple3", { 0x7D, 0x26, 0xCD } },
+ { "Purple4", { 0x55, 0x1A, 0x8B } },
{ "Red", { 0xFF, 0x00, 0x00 } },
+ { "Red1", { 0xFF, 0x00, 0x00 } },
+ { "Red2", { 0xEE, 0x00, 0x00 } },
+ { "Red3", { 0xCD, 0x00, 0x00 } },
+ { "Red4", { 0x8B, 0x00, 0x00 } },
{ "RosyBrown", { 0xBC, 0x8F, 0x8F } },
+ { "RosyBrown1", { 0xFF, 0xC1, 0xC1 } },
+ { "RosyBrown2", { 0xEE, 0xB4, 0xB4 } },
+ { "RosyBrown3", { 0xCD, 0x9B, 0x9B } },
+ { "RosyBrown4", { 0x8B, 0x69, 0x69 } },
{ "RoyalBlue", { 0x41, 0x69, 0xE1 } },
+ { "RoyalBlue1", { 0x48, 0x76, 0xFF } },
+ { "RoyalBlue2", { 0x43, 0x6E, 0xEE } },
+ { "RoyalBlue3", { 0x3A, 0x5F, 0xCD } },
+ { "RoyalBlue4", { 0x27, 0x40, 0x8B } },
{ "SaddleBrown", { 0x8B, 0x45, 0x13 } },
{ "Salmon", { 0xFA, 0x80, 0x72 } },
+ { "Salmon1", { 0xFF, 0x8C, 0x69 } },
+ { "Salmon2", { 0xEE, 0x82, 0x62 } },
+ { "Salmon3", { 0xCD, 0x70, 0x54 } },
+ { "Salmon4", { 0x8B, 0x4C, 0x39 } },
{ "SandyBrown", { 0xF4, 0xA4, 0x60 } },
{ "SeaGreen", { 0x2E, 0x8B, 0x57 } },
+ { "SeaGreen1", { 0x54, 0xFF, 0x9F } },
+ { "SeaGreen2", { 0x4E, 0xEE, 0x94 } },
+ { "SeaGreen3", { 0x43, 0xCD, 0x80 } },
+ { "SeaGreen4", { 0x2E, 0x8B, 0x57 } },
{ "SeaShell", { 0xFF, 0xF5, 0xEE } },
+ { "SeaShell1", { 0xFF, 0xF5, 0xEE } },
+ { "SeaShell2", { 0xEE, 0xE5, 0xDE } },
+ { "SeaShell3", { 0xCD, 0xC5, 0xBF } },
+ { "SeaShell4", { 0x8B, 0x86, 0x82 } },
{ "Sienna", { 0xA0, 0x52, 0x2D } },
+ { "Sienna1", { 0xFF, 0x82, 0x47 } },
+ { "Sienna2", { 0xEE, 0x79, 0x42 } },
+ { "Sienna3", { 0xCD, 0x68, 0x39 } },
+ { "Sienna4", { 0x8B, 0x47, 0x26 } },
{ "Silver", { 0xC0, 0xC0, 0xC0 } },
{ "SkyBlue", { 0x87, 0xCE, 0xEB } },
+ { "SkyBlue1", { 0x87, 0xCE, 0xFF } },
+ { "SkyBlue2", { 0x7E, 0xC0, 0xEE } },
+ { "SkyBlue3", { 0x6C, 0xA6, 0xCD } },
+ { "SkyBlue4", { 0x4A, 0x70, 0x8B } },
{ "SlateBlue", { 0x6A, 0x5A, 0xCD } },
+ { "SlateBlue1", { 0x83, 0x6F, 0xFF } },
+ { "SlateBlue2", { 0x7A, 0x67, 0xEE } },
+ { "SlateBlue3", { 0x69, 0x59, 0xCD } },
+ { "SlateBlue4", { 0x47, 0x3C, 0x8B } },
{ "SlateGray", { 0x70, 0x80, 0x90 } },
+ { "SlateGray1", { 0xC6, 0xE2, 0xFF } },
+ { "SlateGray2", { 0xB9, 0xD3, 0xEE } },
+ { "SlateGray3", { 0x9F, 0xB6, 0xCD } },
+ { "SlateGray4", { 0x6C, 0x7B, 0x8B } },
+ { "SlateGrey", { 0x70, 0x80, 0x90 } },
{ "Snow", { 0xFF, 0xFA, 0xFA } },
+ { "Snow1", { 0xFF, 0xFA, 0xFA } },
+ { "Snow2", { 0xEE, 0xE9, 0xE9 } },
+ { "Snow3", { 0xCD, 0xC9, 0xC9 } },
+ { "Snow4", { 0x8B, 0x89, 0x89 } },
{ "SpringGreen", { 0x00, 0xFF, 0x7F } },
+ { "SpringGreen1", { 0x00, 0xFF, 0x7F } },
+ { "SpringGreen2", { 0x00, 0xEE, 0x76 } },
+ { "SpringGreen3", { 0x00, 0xCD, 0x66 } },
+ { "SpringGreen4", { 0x00, 0x8B, 0x45 } },
{ "SteelBlue", { 0x46, 0x82, 0xB4 } },
+ { "SteelBlue1", { 0x63, 0xB8, 0xFF } },
+ { "SteelBlue2", { 0x5C, 0xAC, 0xEE } },
+ { "SteelBlue3", { 0x4F, 0x94, 0xCD } },
+ { "SteelBlue4", { 0x36, 0x64, 0x8B } },
{ "Tan", { 0xD2, 0xB4, 0x8C } },
+ { "Tan1", { 0xFF, 0xA5, 0x4F } },
+ { "Tan2", { 0xEE, 0x9A, 0x49 } },
+ { "Tan3", { 0xCD, 0x85, 0x3F } },
+ { "Tan4", { 0x8B, 0x5A, 0x2B } },
{ "Teal", { 0x00, 0x80, 0x80 } },
{ "Thistle", { 0xD8, 0xBF, 0xD8 } },
+ { "Thistle1", { 0xFF, 0xE1, 0xFF } },
+ { "Thistle2", { 0xEE, 0xD2, 0xEE } },
+ { "Thistle3", { 0xCD, 0xB5, 0xCD } },
+ { "Thistle4", { 0x8B, 0x7B, 0x8B } },
{ "Tomato", { 0xFF, 0x63, 0x47 } },
+ { "Tomato1", { 0xFF, 0x63, 0x47 } },
+ { "Tomato2", { 0xEE, 0x5C, 0x42 } },
+ { "Tomato3", { 0xCD, 0x4F, 0x39 } },
+ { "Tomato4", { 0x8B, 0x36, 0x26 } },
{ "Turquoise", { 0x40, 0xE0, 0xD0 } },
+ { "Turquoise1", { 0x00, 0xF5, 0xFF } },
+ { "Turquoise2", { 0x00, 0xE5, 0xEE } },
+ { "Turquoise3", { 0x00, 0xC5, 0xCD } },
+ { "Turquoise4", { 0x00, 0x86, 0x8B } },
{ "Violet", { 0xEE, 0x82, 0xEE } },
+ { "VioletRed", { 0xD0, 0x20, 0x90 } },
+ { "VioletRed1", { 0xFF, 0x3E, 0x96 } },
+ { "VioletRed2", { 0xEE, 0x3A, 0x8C } },
+ { "VioletRed3", { 0xCD, 0x32, 0x78 } },
+ { "VioletRed4", { 0x8B, 0x22, 0x52 } },
{ "Wheat", { 0xF5, 0xDE, 0xB3 } },
+ { "Wheat1", { 0xFF, 0xE7, 0xBA } },
+ { "Wheat2", { 0xEE, 0xD8, 0xAE } },
+ { "Wheat3", { 0xCD, 0xBA, 0x96 } },
+ { "Wheat4", { 0x8B, 0x7E, 0x66 } },
{ "White", { 0xFF, 0xFF, 0xFF } },
{ "WhiteSmoke", { 0xF5, 0xF5, 0xF5 } },
{ "Yellow", { 0xFF, 0xFF, 0x00 } },
+ { "Yellow1", { 0xFF, 0xFF, 0x00 } },
+ { "Yellow2", { 0xEE, 0xEE, 0x00 } },
+ { "Yellow3", { 0xCD, 0xCD, 0x00 } },
+ { "Yellow4", { 0x8B, 0x8B, 0x00 } },
{ "YellowGreen", { 0x9A, 0xCD, 0x32 } },
};
@@ -358,6 +887,11 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
rgba_color[1] = rgba >> 16;
rgba_color[2] = rgba >> 8;
rgba_color[3] = rgba;
+ } else if (!av_strcasecmp(color_string2, "none")) {
+ rgba_color[0] = 0;
+ rgba_color[1] = 0;
+ rgba_color[2] = 0;
+ rgba_color[3] = 0;
} else if (hex_offset ||
strspn(color_string2, "0123456789ABCDEFabcdef") == len) {
char *tail;
--
1.7.7
More information about the ffmpeg-devel
mailing list