22#ifndef __INCLUDE_NUTTX_VIDEO_RGBCOLOR_H
23#define __INCLUDE_NUTTX_VIDEO_RGBCOLOR_H
37#define RGBTO24(r,g,b) \
38 ((uint32_t)((r) & 0xff) << 16 | (uint32_t)((g) & 0xff) << 8 | (uint32_t)((b) & 0xff))
42#define RGB24RED(rgb) (((rgb) >> 16) & 0xff)
43#define RGB24GREEN(rgb) (((rgb) >> 8) & 0xff)
44#define RGB24BLUE(rgb) ( (rgb) & 0xff)
53#define RGBTO16(r,g,b) \
54 ((((uint16_t)(r) << 8) & 0xf800) | (((uint16_t)(g) << 3) & 0x07e0) | (((uint16_t)(b) >> 3) & 0x001f))
58#define RGB16RED(rgb) (((rgb) >> 8) & 0xf8)
59#define RGB16GREEN(rgb) (((rgb) >> 3) & 0xfc)
60#define RGB16BLUE(rgb) (((rgb) << 3) & 0xf8)
64#define RGBTO8(r,g,b) \
65 ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03))
69#define RGB8RED(rgb) ( (rgb) & 0xe0)
70#define RGB8GREEN(rgb) (((rgb) << 3) & 0xe0)
71#define RGB8BLUE(rgb) (((rgb) << 6) & 0xc0)
78#define RGB24TO16(rgb24) \
79 (((rgb24 >> 8) & 0xf800) | ((rgb24 >> 5) & 0x07e0) | ((rgb24 >> 3) & 0x001f))
86#define RGB16TO24(rgb16) \
87 (((rgb16 & 0xf800) << 8) | ((rgb16 & 0x07e0) << 5) | ((rgb16 & 0x001f) << 3))
93#define RGB24_BLACK 0x00000000
94#define RGB24_WHITE 0x00ffffff
96#define RGB24_BLUE 0x000000ff
97#define RGB24_GREEN 0x0000ff00
98#define RGB24_RED 0x00ff0000
100#define RGB24_NAVY 0x00000080
101#define RGB24_DARKBLUE 0x0000008b
102#define RGB24_DARKGREEN 0x00006400
103#define RGB24_DARKCYAN 0x00008b8b
104#define RGB24_CYAN 0x0000ffff
105#define RGB24_TURQUOISE 0x0040e0d0
106#define RGB24_INDIGO 0x004b0082
107#define RGB24_DARKRED 0x00800000
108#define RGB24_OLIVE 0x00808000
109#define RGB24_GRAY 0x00808080
110#define RGB24_SKYBLUE 0x0087ceeb
111#define RGB24_BLUEVIOLET 0x008a2be2
112#define RGB24_LIGHTGREEN 0x0090ee90
113#define RGB24_DARKVIOLET 0x009400d3
114#define RGB24_YELLOWGREEN 0x009acd32
115#define RGB24_BROWN 0x00a52a2a
116#define RGB24_DARKGRAY 0x00a9a9a9
117#define RGB24_SIENNA 0x00a0522d
118#define RGB24_LIGHTBLUE 0x00add8e6
119#define RGB24_GREENYELLOW 0x00adff2f
120#define RGB24_SILVER 0x00c0c0c0
121#define RGB24_LIGHTGREY 0x00d3d3d3
122#define RGB24_LIGHTCYAN 0x00e0ffff
123#define RGB24_VIOLET 0x00ee82ee
124#define RGB24_AZUR 0x00f0ffff
125#define RGB24_BEIGE 0x00f5f5dc
126#define RGB24_MAGENTA 0x00ff00ff
127#define RGB24_TOMATO 0x00ff6347
128#define RGB24_GOLD 0x00ffd700
129#define RGB24_ORANGE 0x00ffa500
130#define RGB24_SNOW 0x00fffafa
131#define RGB24_YELLOW 0x00ffff00
135#define RGB16_BLACK 0x0000
136#define RGB16_WHITE 0xffff
138#define RGB16_BLUE 0x001f
139#define RGB16_GREEN 0x07e0
140#define RGB16_RED 0xf800
142#define RGB16_NAVY 0x0010
143#define RGB16_DARKBLUE 0x0011
144#define RGB16_DARKGREEN 0x0320
145#define RGB16_DARKCYAN 0x0451
146#define RGB16_CYAN 0x07ff
147#define RGB16_TURQUOISE 0x471a
148#define RGB16_INDIGO 0x4810
149#define RGB16_DARKRED 0x8000
150#define RGB16_OLIVE 0x8400
151#define RGB16_GRAY 0x8410
152#define RGB16_SKYBLUE 0x867d
153#define RGB16_BLUEVIOLET 0x895c
154#define RGB16_LIGHTGREEN 0x9772
155#define RGB16_DARKVIOLET 0x901a
156#define RGB16_YELLOWGREEN 0x9e66
157#define RGB16_BROWN 0xa145
158#define RGB16_DARKGRAY 0xad55
159#define RGB16_SIENNA 0xa285
160#define RGB16_LIGHTBLUE 0xaedc
161#define RGB16_GREENYELLOW 0xafe5
162#define RGB16_SILVER 0xc618
163#define RGB16_LIGHTGREY 0xd69a
164#define RGB16_LIGHTCYAN 0xe7ff
165#define RGB16_VIOLET 0xec1d
166#define RGB16_AZUR 0xf7ff
167#define RGB16_BEIGE 0xf7bb
168#define RGB16_MAGENTA 0xf81f
169#define RGB16_TOMATO 0xfb08
170#define RGB16_GOLD 0xfea0
171#define RGB16_ORANGE 0xfd20
172#define RGB16_SNOW 0xffdf
173#define RGB16_YELLOW 0xffe0
177#define RGB12_BLACK 0x0000
178#define RGB12_WHITE 0x0fff
180#define RGB12_BLUE 0x000f
181#define RGB12_GREEN 0x00f0
182#define RGB12_RED 0x0f00
184#define RGB12_NAVY 0x0008
185#define RGB12_DARKBLUE 0x0009
186#define RGB12_DARKGREEN 0x0060
187#define RGB12_DARKCYAN 0x0099
188#define RGB12_CYAN 0x00ff
189#define RGB12_TURQUOISE 0x04ed
190#define RGB12_INDIGO 0x0508
191#define RGB12_DARKRED 0x0800
192#define RGB12_OLIVE 0x0880
193#define RGB12_GRAY 0x0888
194#define RGB12_SKYBLUE 0x08df
195#define RGB12_BLUEVIOLET 0x093e
196#define RGB12_LIGHTGREEN 0x09f9
197#define RGB12_DARKVIOLET 0x090d
198#define RGB12_YELLOWGREEN 0x0ad3
199#define RGB12_BROWN 0x0a33
200#define RGB12_DARKGRAY 0x0bbb
201#define RGB12_SIENNA 0x0a53
202#define RGB12_LIGHTBLUE 0x0bee
203#define RGB12_GREENYELLOW 0x0bf3
204#define RGB12_SILVER 0x0ccc
205#define RGB12_LIGHTGREY 0x0ddd
206#define RGB12_LIGHTCYAN 0x0eff
207#define RGB12_VIOLET 0x0f8f
208#define RGB12_AZUR 0x0fff
209#define RGB12_BEIGE 0x0ffe
210#define RGB12_MAGENTA 0x0f0f
211#define RGB12_TOMATO 0x0f64
212#define RGB12_GOLD 0x0fd0
213#define RGB12_ORANGE 0x0fa0
214#define RGB12_SNOW 0x0fff
215#define RGB12_YELLOW 0x0ff0
221#define RGB8_BLACK 0x00
222#define RGB8_WHITE 0xff
224#define RGB8_BLUE 0x03
225#define RGB8_GREEN 0x1c
227#define RGB8_NAVY 0x02
228#define RGB8_DARKBLUE 0x02
229#define RGB8_DARKGREEN 0x0c
230#define RGB8_DARKCYAN 0x16
231#define RGB8_CYAN 0x1f
232#define RGB8_TURQUOISE 0x5f
233#define RGB8_INDIGO 0x62
234#define RGB8_DARKRED 0x80
235#define RGB8_OLIVE 0x90
236#define RGB8_GRAY 0x92
237#define RGB8_SKYBLUE 0x9f
238#define RGB8_BLUEVIOLET 0xab
239#define RGB8_LIGHTGREEN 0xbe
240#define RGB8_DARKVIOLET 0x93
241#define RGB8_YELLOWGREEN 0x9d
242#define RGB8_BROWN 0xa9
243#define RGB8_DARKGRAY 0xdb
244#define RGB8_SIENNA 0xa9
245#define RGB8_LIGHTBLUE 0xdf
246#define RGB8_GREENYELLOW 0xdd
247#define RGB8_SILVER 0xd9
248#define RGB8_LIGHTGREY 0xd9
249#define RGB8_LIGHTCYAN 0xff
250#define RGB8_VIOLET 0xf3
251#define RGB8_AZUR 0xff
252#define RGB8_BEIGE 0xff
253#define RGB8_MAGENTA 0xed
254#define RGB8_TOMATO 0xfc
255#define RGB8_GOLD 0xfc
256#define RGB8_ORANGE 0xf8
257#define RGB8_SNOW 0xff
258#define RGB8_YELLOW 0xfc
290#define EXTERN extern "C"
Definition: rgbcolors.h:278
Definition: rgbcolors.h:269