---
application: "Intervention Image"
version: "Version 2"
status: "eol"
---

# Image::colorize

## Change the color balance of the current image



> public Intervention\Image\Image colorize(integer $red, integer $green, integer $blue)

Change the RGB color values of the current image on the given channels **red**, **green** and **blue**. The input values are normalized so you have to include parameters from ```100``` for maximum color value ```0``` for no change and ```-100``` to take out all the certain color on the image.

### Parameters

#### red
Add or take out a amount of red color on the image. Use values between `-100` and `+100`.

#### green
Add or take out a amount of green color on the image. Use values between `-100` and `+100`.

#### blue
Add or take out a amount of blue color on the image. Use values between `-100` and `+100`.


### Return Values
Instance of `Intervention\Image\Image`

### Examples

```php
// create new Intervention Image
$img = Image::make('public/foo.jpg');

// take out red color and add blue
$img->colorize(-100, 0, 100);

// just add a little green tone to the image
$img->colorize(0, 30, 0);
```

### See also

- [brightness](https://image.intervention.io/v2/api/brightness.md)
- [contrast](https://image.intervention.io/v2/api/contrast.md)
- [gamma](https://image.intervention.io/v2/api/gamma.md)
- [greyscale](https://image.intervention.io/v2/api/greyscale.md)
- [invert](https://image.intervention.io/v2/api/invert.md)
- [pixelate](https://image.intervention.io/v2/api/pixelate.md)

---

## Become a Sponsor

### Intervention Image needs your help to keep the project going

Intervention Image is non-commercial, open source licensed and completely free to use. The considerable
effort required to maintain and develop the software is only possible with the financial support
of sponsors. There are two ways in which you can support this project.

- Support via [GitHub Sponsors](https://github.com/sponsors/Intervention)
- Support via [Ko-Fi](https://ko-fi.com/interventionphp)