---
name: "clear_to_color"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/clear_to_color/3alleg4"
---

# clear\_to\_color(3alleg4)

Clears the bitmap to the specified color. Allegro game programming library.

## NAME

clear\_to\_color - Clears the bitmap to the specified color. Allegro game programming library.

## SYNOPSIS

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

**void clear\_to\_color(BITMAP \*bitmap, int color);**

## DESCRIPTION

Clears the bitmap to the specified color. Example:

```
   /* Clear the screen to red. */
   clear_to_color(bmp, makecol(255, 0, 0));
```

## SEE ALSO

**clear\_bitmap**(3alleg4), **makecol**(3alleg4)
