python-lottie  0.6.11+devc144cca
A framework to work with lottie files and telegram animated stickers (tgs)
svgdata.py
Go to the documentation of this file.
1 color_table = {
2  "aliceblue": [0.9411764705882353, 0.9725490196078431, 1.0, 1],
3  "antiquewhite": [0.9803921568627451, 0.9215686274509803, 0.8431372549019608, 1],
4  "aqua": [0.0, 1.0, 1.0, 1],
5  "aquamarine": [0.4980392156862745, 1.0, 0.8313725490196079, 1],
6  "azure": [0.9411764705882353, 1.0, 1.0, 1],
7  "beige": [0.9607843137254902, 0.9607843137254902, 0.8627450980392157, 1],
8  "bisque": [1.0, 0.8941176470588236, 0.7686274509803922, 1],
9  "black": [0.0, 0.0, 0.0, 1],
10  "blanchedalmond": [1.0, 0.9215686274509803, 0.803921568627451, 1],
11  "blue": [0.0, 0.0, 1.0, 1],
12  "blueviolet": [0.5411764705882353, 0.16862745098039217, 0.8862745098039215, 1],
13  "brown": [0.6470588235294118, 0.16470588235294117, 0.16470588235294117, 1],
14  "burlywood": [0.8705882352941177, 0.7215686274509804, 0.5294117647058824, 1],
15  "cadetblue": [0.37254901960784315, 0.6196078431372549, 0.6274509803921569, 1],
16  "chartreuse": [0.4980392156862745, 1.0, 0.0, 1],
17  "chocolate": [0.8235294117647058, 0.4117647058823529, 0.11764705882352941, 1],
18  "coral": [1.0, 0.4980392156862745, 0.3137254901960784, 1],
19  "cornflowerblue": [0.39215686274509803, 0.5843137254901961, 0.9294117647058824, 1],
20  "cornsilk": [1.0, 0.9725490196078431, 0.8627450980392157, 1],
21  "crimson": [0.8627450980392157, 0.0784313725490196, 0.23529411764705882, 1],
22  "cyan": [0.0, 1.0, 1.0, 1],
23  "darkblue": [0.0, 0.0, 0.5450980392156862, 1],
24  "darkcyan": [0.0, 0.5450980392156862, 0.5450980392156862, 1],
25  "darkgoldenrod": [0.7215686274509804, 0.5254901960784314, 0.043137254901960784, 1],
26  "darkgray": [0.6627450980392157, 0.6627450980392157, 0.6627450980392157, 1],
27  "darkgreen": [0.0, 0.39215686274509803, 0.0, 1],
28  "darkgrey": [0.6627450980392157, 0.6627450980392157, 0.6627450980392157, 1],
29  "darkkhaki": [0.7411764705882353, 0.7176470588235294, 0.4196078431372549, 1],
30  "darkmagenta": [0.5450980392156862, 0.0, 0.5450980392156862, 1],
31  "darkolivegreen": [0.3333333333333333, 0.4196078431372549, 0.1843137254901961, 1],
32  "darkorange": [1.0, 0.5490196078431373, 0.0, 1],
33  "darkorchid": [0.6, 0.19607843137254902, 0.8, 1],
34  "darkred": [0.5450980392156862, 0.0, 0.0, 1],
35  "darksalmon": [0.9137254901960784, 0.5882352941176471, 0.47843137254901963, 1],
36  "darkseagreen": [0.5607843137254902, 0.7372549019607844, 0.5607843137254902, 1],
37  "darkslateblue": [0.2823529411764706, 0.23921568627450981, 0.5450980392156862, 1],
38  "darkslategray": [0.1843137254901961, 0.30980392156862746, 0.30980392156862746, 1],
39  "darkslategrey": [0.1843137254901961, 0.30980392156862746, 0.30980392156862746, 1],
40  "darkturquoise": [0.0, 0.807843137254902, 0.8196078431372549, 1],
41  "darkviolet": [0.5803921568627451, 0.0, 0.8274509803921568, 1],
42  "deeppink": [1.0, 0.0784313725490196, 0.5764705882352941, 1],
43  "deepskyblue": [0.0, 0.7490196078431373, 1.0, 1],
44  "dimgray": [0.4117647058823529, 0.4117647058823529, 0.4117647058823529, 1],
45  "dimgrey": [0.4117647058823529, 0.4117647058823529, 0.4117647058823529, 1],
46  "dodgerblue": [0.11764705882352941, 0.5647058823529412, 1.0, 1],
47  "firebrick": [0.6980392156862745, 0.13333333333333333, 0.13333333333333333, 1],
48  "floralwhite": [1.0, 0.9803921568627451, 0.9411764705882353, 1],
49  "forestgreen": [0.13333333333333333, 0.5450980392156862, 0.13333333333333333, 1],
50  "fuchsia": [1.0, 0.0, 1.0, 1],
51  "gainsboro": [0.8627450980392157, 0.8627450980392157, 0.8627450980392157, 1],
52  "ghostwhite": [0.9725490196078431, 0.9725490196078431, 1.0, 1],
53  "gold": [1.0, 0.8431372549019608, 0.0, 1],
54  "goldenrod": [0.8549019607843137, 0.6470588235294118, 0.12549019607843137, 1],
55  "gray": [0.5019607843137255, 0.5019607843137255, 0.5019607843137255, 1],
56  "green": [0.0, 0.5019607843137255, 0.0, 1],
57  "greenyellow": [0.6784313725490196, 1.0, 0.1843137254901961, 1],
58  "grey": [0.5019607843137255, 0.5019607843137255, 0.5019607843137255, 1],
59  "honeydew": [0.9411764705882353, 1.0, 0.9411764705882353, 1],
60  "hotpink": [1.0, 0.4117647058823529, 0.7058823529411765, 1],
61  "indianred": [0.803921568627451, 0.3607843137254902, 0.3607843137254902, 1],
62  "indigo": [0.29411764705882354, 0.0, 0.5098039215686274, 1],
63  "ivory": [1.0, 1.0, 0.9411764705882353, 1],
64  "khaki": [0.9411764705882353, 0.9019607843137255, 0.5490196078431373, 1],
65  "lavender": [0.9019607843137255, 0.9019607843137255, 0.9803921568627451, 1],
66  "lavenderblush": [1.0, 0.9411764705882353, 0.9607843137254902, 1],
67  "lawngreen": [0.48627450980392156, 0.9882352941176471, 0.0, 1],
68  "lemonchiffon": [1.0, 0.9803921568627451, 0.803921568627451, 1],
69  "lightblue": [0.6784313725490196, 0.8470588235294118, 0.9019607843137255, 1],
70  "lightcoral": [0.9411764705882353, 0.5019607843137255, 0.5019607843137255, 1],
71  "lightcyan": [0.8784313725490196, 1.0, 1.0, 1],
72  "lightgoldenrodyellow": [0.9803921568627451, 0.9803921568627451, 0.8235294117647058, 1],
73  "lightgray": [0.8274509803921568, 0.8274509803921568, 0.8274509803921568, 1],
74  "lightgreen": [0.5647058823529412, 0.9333333333333333, 0.5647058823529412, 1],
75  "lightgrey": [0.8274509803921568, 0.8274509803921568, 0.8274509803921568, 1],
76  "lightpink": [1.0, 0.7137254901960784, 0.7568627450980392, 1],
77  "lightsalmon": [1.0, 0.6274509803921569, 0.47843137254901963, 1],
78  "lightseagreen": [0.12549019607843137, 0.6980392156862745, 0.6666666666666666, 1],
79  "lightskyblue": [0.5294117647058824, 0.807843137254902, 0.9803921568627451, 1],
80  "lightslategray": [0.4666666666666667, 0.5333333333333333, 0.6, 1],
81  "lightslategrey": [0.4666666666666667, 0.5333333333333333, 0.6, 1],
82  "lightsteelblue": [0.6901960784313725, 0.7686274509803922, 0.8705882352941177, 1],
83  "lightyellow": [1.0, 1.0, 0.8784313725490196, 1],
84  "lime": [0.0, 1.0, 0.0, 1],
85  "limegreen": [0.19607843137254902, 0.803921568627451, 0.19607843137254902, 1],
86  "linen": [0.9803921568627451, 0.9411764705882353, 0.9019607843137255, 1],
87  "magenta": [1.0, 0.0, 1.0, 1],
88  "maroon": [0.5019607843137255, 0.0, 0.0, 1],
89  "mediumaquamarine": [0.4, 0.803921568627451, 0.6666666666666666, 1],
90  "mediumblue": [0.0, 0.0, 0.803921568627451, 1],
91  "mediumorchid": [0.7294117647058823, 0.3333333333333333, 0.8274509803921568, 1],
92  "mediumpurple": [0.5764705882352941, 0.4392156862745098, 0.8588235294117647, 1],
93  "mediumseagreen": [0.23529411764705882, 0.7019607843137254, 0.44313725490196076, 1],
94  "mediumslateblue": [0.4823529411764706, 0.40784313725490196, 0.9333333333333333, 1],
95  "mediumspringgreen": [0.0, 0.9803921568627451, 0.6039215686274509, 1],
96  "mediumturquoise": [0.2823529411764706, 0.8196078431372549, 0.8, 1],
97  "mediumvioletred": [0.7803921568627451, 0.08235294117647059, 0.5215686274509804, 1],
98  "midnightblue": [0.09803921568627451, 0.09803921568627451, 0.4392156862745098, 1],
99  "mintcream": [0.9607843137254902, 1.0, 0.9803921568627451, 1],
100  "mistyrose": [1.0, 0.8941176470588236, 0.8823529411764706, 1],
101  "moccasin": [1.0, 0.8941176470588236, 0.7098039215686275, 1],
102  "navajowhite": [1.0, 0.8705882352941177, 0.6784313725490196, 1],
103  "navy": [0.0, 0.0, 0.5019607843137255, 1],
104  "oldlace": [0.9921568627450981, 0.9607843137254902, 0.9019607843137255, 1],
105  "olive": [0.5019607843137255, 0.5019607843137255, 0.0, 1],
106  "olivedrab": [0.4196078431372549, 0.5568627450980392, 0.13725490196078433, 1],
107  "orange": [1.0, 0.6470588235294118, 0.0, 1],
108  "orangered": [1.0, 0.27058823529411763, 0.0, 1],
109  "orchid": [0.8549019607843137, 0.4392156862745098, 0.8392156862745098, 1],
110  "palegoldenrod": [0.9333333333333333, 0.9098039215686274, 0.6666666666666666, 1],
111  "palegreen": [0.596078431372549, 0.984313725490196, 0.596078431372549, 1],
112  "paleturquoise": [0.6862745098039216, 0.9333333333333333, 0.9333333333333333, 1],
113  "palevioletred": [0.8588235294117647, 0.4392156862745098, 0.5764705882352941, 1],
114  "papayawhip": [1.0, 0.9372549019607843, 0.8352941176470589, 1],
115  "peachpuff": [1.0, 0.8549019607843137, 0.7254901960784313, 1],
116  "peru": [0.803921568627451, 0.5215686274509804, 0.24705882352941178, 1],
117  "pink": [1.0, 0.7529411764705882, 0.796078431372549, 1],
118  "plum": [0.8666666666666667, 0.6274509803921569, 0.8666666666666667, 1],
119  "powderblue": [0.6901960784313725, 0.8784313725490196, 0.9019607843137255, 1],
120  "purple": [0.5019607843137255, 0.0, 0.5019607843137255, 1],
121  "red": [1.0, 0.0, 0.0, 1],
122  "rosybrown": [0.7372549019607844, 0.5607843137254902, 0.5607843137254902, 1],
123  "royalblue": [0.2549019607843137, 0.4117647058823529, 0.8823529411764706, 1],
124  "saddlebrown": [0.5450980392156862, 0.27058823529411763, 0.07450980392156863, 1],
125  "salmon": [0.9803921568627451, 0.5019607843137255, 0.4470588235294118, 1],
126  "sandybrown": [0.9568627450980393, 0.6431372549019608, 0.3764705882352941, 1],
127  "seagreen": [0.1803921568627451, 0.5450980392156862, 0.3411764705882353, 1],
128  "seashell": [1.0, 0.9607843137254902, 0.9333333333333333, 1],
129  "sienna": [0.6274509803921569, 0.3215686274509804, 0.17647058823529413, 1],
130  "silver": [0.7529411764705882, 0.7529411764705882, 0.7529411764705882, 1],
131  "skyblue": [0.5294117647058824, 0.807843137254902, 0.9215686274509803, 1],
132  "slateblue": [0.41568627450980394, 0.35294117647058826, 0.803921568627451, 1],
133  "slategray": [0.4392156862745098, 0.5019607843137255, 0.5647058823529412, 1],
134  "slategrey": [0.4392156862745098, 0.5019607843137255, 0.5647058823529412, 1],
135  "snow": [1.0, 0.9803921568627451, 0.9803921568627451, 1],
136  "springgreen": [0.0, 1.0, 0.4980392156862745, 1],
137  "steelblue": [0.27450980392156865, 0.5098039215686274, 0.7058823529411765, 1],
138  "tan": [0.8235294117647058, 0.7058823529411765, 0.5490196078431373, 1],
139  "teal": [0.0, 0.5019607843137255, 0.5019607843137255, 1],
140  "thistle": [0.8470588235294118, 0.7490196078431373, 0.8470588235294118, 1],
141  "tomato": [1.0, 0.38823529411764707, 0.2784313725490196, 1],
142  "turquoise": [0.25098039215686274, 0.8784313725490196, 0.8156862745098039, 1],
143  "violet": [0.9333333333333333, 0.5098039215686274, 0.9333333333333333, 1],
144  "wheat": [0.9607843137254902, 0.8705882352941177, 0.7019607843137254, 1],
145  "white": [1.0, 1.0, 1.0, 1],
146  "whitesmoke": [0.9607843137254902, 0.9607843137254902, 0.9607843137254902, 1],
147  "yellow": [1.0, 1.0, 0.0, 1],
148  "yellowgreen": [0.6039215686274509, 0.803921568627451, 0.19607843137254902, 1],
149 }
150 
151 css_atrrs = {
152  "fill",
153  "alignment-baseline",
154  "baseline-shift",
155  "clip-path",
156  "clip-rule",
157  "color",
158  "color-interpolation",
159  "color-interpolation-filters",
160  "color-rendering",
161  "cursor",
162  "direction",
163  "display",
164  "dominant-baseline",
165  "fill-opacity",
166  "fill-rule",
167  "filter",
168  "flood-color",
169  "flood-opacity",
170  "font-family",
171  "font-size",
172  "font-size-adjust",
173  "font-stretch",
174  "font-style",
175  "font-variant",
176  "font-weight",
177  "glyph-orientation-horizontal",
178  "glyph-orientation-vertical",
179  "image-rendering",
180  "letter-spacing",
181  "lighting-color",
182  "marker-end",
183  "marker-mid",
184  "marker-start",
185  "mask",
186  "opacity",
187  "overflow",
188  "paint-order",
189  "pointer-events",
190  "shape-rendering",
191  "stop-color",
192  "stop-opacity",
193  "stroke",
194  "stroke-dasharray",
195  "stroke-dashoffset",
196  "stroke-linecap",
197  "stroke-linejoin",
198  "stroke-miterlimit",
199  "stroke-opacity",
200  "stroke-width",
201  "text-anchor",
202  "text-decoration",
203  "text-overflow",
204  "text-rendering",
205  "unicode-bidi",
206  "vector-effect",
207  "visibility",
208  "white-space",
209  "word-spacing",
210  "writing-mode"
211 }