1makecol(3)                      Allegro manual                      makecol(3)
2
3
4

NAME

6       makecol  - Converts an RGB value into the current pixel format. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int makecol(int r, int g, int b);
14

DESCRIPTION

16       Converts colors from a hardware independent  format  (red,  green,  and
17       blue  values ranging 0-255) to the pixel format required by the current
18       video mode, calling the preceding 8, 15,  16,  24,  or  32-bit  makecol
19       functions as appropriate. Example:
20
21          /* Regardless of color depth, this will look green. */
22          int green_color = makecol(0, 255, 0);
23

RETURN VALUE

25       Returns the requested RGB triplet in the current color depth.
26
27

SEE ALSO

29       makeacol(3),    makecol8(3),   makecol_depth(3),   makecol15_dither(3),
30       rgb_map(3), set_color_depth(3)
31
32
33
34Allegro                          version 4.4.3                      makecol(3)
Impressum