# Blending

[Canonical page](https://nothing.graphics/docs/format/reference/blending) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/blending.md)

Set the compositing mode and opacity of a drawable.



<!-- Generated by ncf/tools/reference/generate.mjs. -->

Blend mode determines what the drawable paints into. Opacity applies once to the completed visual result.

## Example [#example]

### Multiply a shape against the scene background [#multiply-a-shape-against-the-scene-background]

Place a Multiply shape in a group with the default `pass-through` mode. Its gray paint multiplies with the scene’s gray background, giving approximately 64 in each RGB channel at (8, 4). The next group in the complete scene uses `normal` and starts its contents on transparency, giving gray 128 at (24, 4).

```xml
<group>
  <shape blend-mode="multiply"><rect anchor-u="0" anchor-v="0" width="16" height="8"/><fill><paint><solid color="#808080FF"/></paint></fill></shape>
</group>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/blending/plate.nothing)

## Usage context [#usage-context]

Trait `Blending` in the [scene format type model](https://nothing.graphics/docs/format/spec/type-model).

Related pages in this reference are [Drawable](https://nothing.graphics/docs/format/reference/drawable).

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `opacity` [#opacity]

**Value** fraction · **If omitted** `1` · **Keys** Scalar

Opacity from 0 to 1, applied once to the completed visual result.

### `blend-mode` [#blend-mode]

**Value** `normal`, `multiply`, `screen`, `pass-through` · **If omitted** See [`<shape>`](https://nothing.graphics/docs/format/reference/shape#blend-mode), [`<group>`](https://nothing.graphics/docs/format/reference/group#blend-mode), [`<sequence>`](https://nothing.graphics/docs/format/reference/sequence#blend-mode) · **Keys** Held

Blend the assembled drawable into its enclosing paint scope. See the allowed values on [`<sequence>`](https://nothing.graphics/docs/format/reference/sequence#blend-mode).

## Specifications [#specifications]

* [Compositing and coverage](https://nothing.graphics/docs/format/spec/spatial#compositing-and-coverage)
