makecol man page

makecol — Converts an RGB value into the current pixel format. Allegro game programming library.


#include <allegro.h>

int makecol(int r, int g, int b);


Converts colors from a hardware independent format (red, green, and blue values ranging 0-255) to the pixel format required by the current video mode, calling the preceding 8, 15, 16, 24, or 32-bit makecol functions as appropriate. Example:

/* Regardless of color depth, this will look green. */
int green_color = makecol(0, 255, 0);

Return Value

Returns the requested RGB triplet in the current color depth.

See Also

makeacol(3), makecol8(3), makecol_depth(3), makecol15_dither(3), rgb_map(3), set_color_depth(3)

Referenced By

arc(3), circle(3), circlefill(3), clear_to_color(3), ellipse(3), ellipsefill(3), ex12bit(3), exalpha(3), exblend(3), excamera(3), excolmap(3), exconfig(3), excustom(3), exdata(3), exdbuf(3), exexedat(3), exflame(3), exflip(3), exfont(3), exgui(3), exhello(3), exkeys(3), exlights(3), exmidi(3), exmouse(3), expat(3), exrgbhsv(3), exrotscl(3), exsample(3), exspline(3), exsprite(3), exstream(3), exswitch(3), exsyscur(3), extimer(3), extrans2(3), extruec(3), exupdate(3), fastline(3), floodfill(3), getr(3), getr8(3), getr_depth(3), hline(3), line(3), makeacol(3), makecol15_dither(3), makecol8(3), makecol_depth(3), MASK_COLOR_8(3), palette_color(3), polygon(3), POLYTYPE_GCOL(3), putpixel(3), _putpixel(3), rect(3), rectfill(3), set_color_depth(3), spline(3), triangle(3), vline(3).

Explore man page connections for makecol(3).

Allegro version 4.4.2 Allegro manual