<div class='type'>Function</div>


<a id='references'></a>


<h2 id="compositeover-background">compositeOver</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Color.compositeOver(background: Color): Color
```


Composites `this` color on top of `background` using the Porter-Duff 'source over' mode.

Both `this` and `background` must not be pre-multiplied, and the resulting color will also not be
pre-multiplied.

The `ColorSpace` of the result is always the `ColorSpace` of `background`.

#### Returns

| | |
| --- | --- |
|  | the `Color` representing `this` composited on top of `background`, converted to the color space of `background`. |