---
title: "coverageOver"
description: "Lays a light color over a background color by a coverage field, like a layer with an opacity mask, as a finished paint."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "light"
categorySlug: "light"
categoryTitle: "Light"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/light.ts#L911"
---

# coverageOver

Lays a light color over a background color by a coverage field, like a layer with an opacity mask, as a finished paint.

```ts
coverageOver(slots: {color: PropRef; background: PropRef; coverage: LightValue}): LightValue
```

Import `light` from `shaders/std` and use `light.coverageOver`.

`color` and `background` are color props, `coverage` a 0–1 light. The color's own alpha counts as opacity, so a half-transparent ray color shows the background through it.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{color: PropRef; background: PropRef; coverage: LightValue}` |  |

## Example

```ts
paint: coverageOver({color: p('rayColor'), background: p('backgroundColor'), coverage: withFrame(seamlessRadialFrame(p('center')), noiseRays({density: p('density'), intensity: p('intensity'), spotty: p('spotty')}))})
```

## See also

- [`coverageMix`](/docs/primitives/light/coveragemix) — Blends from a background color to a light color by a coverage field, as a finished paint.
- [`noiseRays`](/docs/primitives/light/noiserays) — Volumetric god rays: shafts of light drifting outward from the center, moving on the layer's clock.

## Used by

[Godrays](/docs/components/godrays)