---
name: "clear_to_color"
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/clear_to_color"
---

# clear\_to\_color(3alleg)

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**(3alleg)](/clear_bitmap/3alleg.md), [**makecol**(3alleg)](/makecol/3alleg.md)
