.\" Generated by the Allegro makedoc utility .TH getr8 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME getr8, getg8, getb8, getr15, getg15, getb15, getr16, getg16, getb16, getr24, getg24, getb24, getr32, getg32, getb32 \- Extract a color component from the specified pixel format. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B int getr8(int c); .B int getg8(int c); .B int getb8(int c); .B int getr15(int c); .B int getg15(int c); .B int getb15(int c); .B int getr16(int c); .B int getg16(int c); .B int getb16(int c); .B int getr24(int c); .B int getg24(int c); .B int getb24(int c); .B int getr32(int c); .B int getg32(int c); .B int getb32(int c); .SH DESCRIPTION Given a color in a display dependent format, these functions extract one of the red, green, or blue components (ranging 0-255). Example: .nf int r, g, b, color_value; color_value = _getpixel15(screen, 100, 100); r = getr15(color_value); g = getg15(color_value); b = getb15(color_value); .fi .SH SEE ALSO .BR geta32 (3alleg4), .BR getr (3alleg4), .BR getr_depth (3alleg4), .BR makecol (3alleg4), .BR set_color_depth (3alleg4)