1%{
2#include "config.h"
3#include "platform/graphics/Color.h"
4#include <string.h>
5
6namespace blink {
7%}
8%struct-type
9struct NamedColor;
10%omit-struct-type
11%language=C++
12%readonly-tables
13%global-table
14%compare-strncmp
15%define class-name ColorDataHash
16%define lookup-function-name findColorImpl
17%define hash-function-name colordata_hash_function
18%enum
19%%
20aliceblue, 0xfff0f8ff
21antiquewhite, 0xfffaebd7
22aqua, 0xff00ffff
23aquamarine, 0xff7fffd4
24azure, 0xfff0ffff
25beige, 0xfff5f5dc
26bisque, 0xffffe4c4
27black, 0xff000000
28blanchedalmond, 0xffffebcd
29blue, 0xff0000ff
30blueviolet, 0xff8a2be2
31brown, 0xffa52a2a
32burlywood, 0xffdeb887
33cadetblue, 0xff5f9ea0
34chartreuse, 0xff7fff00
35chocolate, 0xffd2691e
36coral, 0xffff7f50
37cornflowerblue, 0xff6495ed
38cornsilk, 0xfffff8dc
39crimson, 0xffdc143c
40cyan, 0xff00ffff
41darkblue, 0xff00008b
42darkcyan, 0xff008b8b
43darkgoldenrod, 0xffb8860b
44darkgray, 0xffa9a9a9
45darkgrey, 0xffa9a9a9
46darkgreen, 0xff006400
47darkkhaki, 0xffbdb76b
48darkmagenta, 0xff8b008b
49darkolivegreen, 0xff556b2f
50darkorange, 0xffff8c00
51darkorchid, 0xff9932cc
52darkred, 0xff8b0000
53darksalmon, 0xffe9967a
54darkseagreen, 0xff8fbc8f
55darkslateblue, 0xff483d8b
56darkslategray, 0xff2f4f4f
57darkslategrey, 0xff2f4f4f
58darkturquoise, 0xff00ced1
59darkviolet, 0xff9400d3
60deeppink, 0xffff1493
61deepskyblue, 0xff00bfff
62dimgray, 0xff696969
63dimgrey, 0xff696969
64dodgerblue, 0xff1e90ff
65firebrick, 0xffb22222
66floralwhite, 0xfffffaf0
67forestgreen, 0xff228b22
68fuchsia, 0xffff00ff
69gainsboro, 0xffdcdcdc
70ghostwhite, 0xfff8f8ff
71gold, 0xffffd700
72goldenrod, 0xffdaa520
73gray, 0xff808080
74grey, 0xff808080
75green, 0xff008000
76greenyellow, 0xffadff2f
77honeydew, 0xfff0fff0
78hotpink, 0xffff69b4
79indianred, 0xffcd5c5c
80indigo, 0xff4b0082
81ivory, 0xfffffff0
82khaki, 0xfff0e68c
83lavender, 0xffe6e6fa
84lavenderblush, 0xfffff0f5
85lawngreen, 0xff7cfc00
86lemonchiffon, 0xfffffacd
87lightblue, 0xffadd8e6
88lightcoral, 0xfff08080
89lightcyan, 0xffe0ffff
90lightgoldenrodyellow, 0xfffafad2
91lightgray, 0xffd3d3d3
92lightgrey, 0xffd3d3d3
93lightgreen, 0xff90ee90
94lightpink, 0xffffb6c1
95lightsalmon, 0xffffa07a
96lightseagreen, 0xff20b2aa
97lightskyblue, 0xff87cefa
98lightslateblue, 0xff8470ff
99lightslategray, 0xff778899
100lightslategrey, 0xff778899
101lightsteelblue, 0xffb0c4de
102lightyellow, 0xffffffe0
103lime, 0xff00ff00
104limegreen, 0xff32cd32
105linen, 0xfffaf0e6
106magenta, 0xffff00ff
107maroon, 0xff800000
108mediumaquamarine, 0xff66cdaa
109mediumblue, 0xff0000cd
110mediumorchid, 0xffba55d3
111mediumpurple, 0xff9370db
112mediumseagreen, 0xff3cb371
113mediumslateblue, 0xff7b68ee
114mediumspringgreen, 0xff00fa9a
115mediumturquoise, 0xff48d1cc
116mediumvioletred, 0xffc71585
117midnightblue, 0xff191970
118mintcream, 0xfff5fffa
119mistyrose, 0xffffe4e1
120moccasin, 0xffffe4b5
121navajowhite, 0xffffdead
122navy, 0xff000080
123oldlace, 0xfffdf5e6
124olive, 0xff808000
125olivedrab, 0xff6b8e23
126orange, 0xffffa500
127orangered, 0xffff4500
128orchid, 0xffda70d6
129palegoldenrod, 0xffeee8aa
130palegreen, 0xff98fb98
131paleturquoise, 0xffafeeee
132palevioletred, 0xffdb7093
133papayawhip, 0xffffefd5
134peachpuff, 0xffffdab9
135peru, 0xffcd853f
136pink, 0xffffc0cb
137plum, 0xffdda0dd
138powderblue, 0xffb0e0e6
139purple, 0xff800080
140rebeccapurple, 0xff663399
141red, 0xffff0000
142rosybrown, 0xffbc8f8f
143royalblue, 0xff4169e1
144saddlebrown, 0xff8b4513
145salmon, 0xfffa8072
146sandybrown, 0xfff4a460
147seagreen, 0xff2e8b57
148seashell, 0xfffff5ee
149sienna, 0xffa0522d
150silver, 0xffc0c0c0
151skyblue, 0xff87ceeb
152slateblue, 0xff6a5acd
153slategray, 0xff708090
154slategrey, 0xff708090
155snow, 0xfffffafa
156springgreen, 0xff00ff7f
157steelblue, 0xff4682b4
158tan, 0xffd2b48c
159teal, 0xff008080
160thistle, 0xffd8bfd8
161tomato, 0xffff6347
162transparent, 0x00000000
163turquoise, 0xff40e0d0
164violet, 0xffee82ee
165violetred, 0xffd02090
166wheat, 0xfff5deb3
167white, 0xffffffff
168whitesmoke, 0xfff5f5f5
169yellow, 0xffffff00
170yellowgreen, 0xff9acd32
171%%
172const struct NamedColor* findColor(register const char* str, register unsigned len)
173{
174    return ColorDataHash::findColorImpl(str, len);
175}
176
177} // namespace blink
178