Up |
_color_convert
Converts a color in various modes.
Prototype :
fun [I I I tab I] I
- I : initial color
- I : from the mode : COLOR_8, COLOR_RGB16, COLOR_RGB24, COLOR_BGR16, COLOR_BGR24
- I : to the mode : COLOR_8, COLOR_RGB16, COLOR_RGB24, COLOR_BGR16, COLOR_BGR24
- tab I : palette (can be nil if mode is not in 8-bits (COLOR_8)
Return : I the converted color or nil if error
See also :
Example :
Convert a BGR 24-bits color in RGB 24-bits color
fun main ()=
_showconsole;
let 0xffaa11 -> colorBGR in
let _color_convert colorBGR COLOR_BGR24 COLOR_RGB24 nil -> colorRGB in
_fooI colorRGB; // 11aaff
0;;