> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FillRegionWithColor Method of the ImageProcessingTools Object

This method fills the specified region with color.

## Syntax

```vb Visual Basic .NET theme={null}
Function FillRegionWithColor( _
  Image As Image, _
  Region As Region, _
  Color As Integer _
) As Image
```

```cpp C++ theme={null}
HRESULT FillRegionWithColor(
  IImage*  Image,
  IRegion* Region,
  int      Color,
  IImage** Result
);
```

## Parameters

**Image**

\[in] This variable refers to the [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md) object which is to be preprocessed.

**Region**

\[in] Specifies the region, which is to be filled with color. Refers to the [**Region**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region.md) object.

**Color**

\[in] Specifies the color to be used for filling the region on the image. The **Integer** value is calculated from the RGB triplet using the formula: (*red* *value*) + (256 x *green* *value*) + (65536 x *blue* *value*), where *red* *value* is the first triplet component, *green* *value* is the second triplet component, *blue* *value* is the third triplet component.

**Result**

\[out, retval] A pointer to the [**IImage**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md)**\*** pointer variable that provides access to the resulting image.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**ImageProcessingTools**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools.md)
