SYNOPSIS

#include <allegro.h>

int getr8(int c);

int getg8(int c);

int getb8(int c);

int getr15(int c);

int getg15(int c);

int getb15(int c);

int getr16(int c);

int getg16(int c);

int getb16(int c);

int getr24(int c);

int getg24(int c);

int getb24(int c);

int getr32(int c);

int getg32(int c);

int getb32(int c);

DESCRIPTION

Given a color in a display dependent format, these functions extract one of the red, green, or blue components (ranging 0-255). Example:

   int r, g, b, color_value;

   color_value = _getpixel15(screen, 100, 100);
   r = getr15(color_value);
   g = getg15(color_value);
   b = getb15(color_value);

RELATED TO getr15…

geta32(3alleg4), getr(3alleg4), getr_depth(3alleg4), makecol(3alleg4), set_color_depth(3alleg4)