---
name: "makeacol"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/makeacol"
---

# makeacol(3alleg)

Converts RGBA colors into display dependent pixel formats. Allegro game programming library.

## NAME

makeacol, makeacol\_depth - Converts RGBA colors into display dependent pixel formats. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int makeacol(int r, int g, int b, int a);**

**int makeacol\_depth(int color\_depth, int r, int g, int b, int a);**

## DESCRIPTION

Convert RGBA colors into display dependent pixel formats. In anything  less than a 32-bit mode, these are the same as calling makecol() or  makecol\_depth(), but by using these routines it is possible to create  32-bit color values that contain a true 8 bit alpha channel along with  the red, green, and blue components. You should only use RGBA format  colors as the input to draw\_trans\_sprite() or draw\_trans\_rle\_sprite()  after calling set\_alpha\_blender(), rather than drawing them directly to  the screen.

## RETURN VALUE

Returns the requested RGBA quadruplet.

## SEE ALSO

[**makecol**(3alleg)](/makecol/3alleg.md), [**makecol\_depth**(3alleg)](/makecol_depth/3alleg.md), [**set\_alpha\_blender**(3alleg)](/set_alpha_blender/3alleg.md), [**set\_write\_alpha\_blender**(3alleg)](/set_write_alpha_blender/3alleg.md)
