# `<paint>`

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

Add one typed value to a fill or stroke's paint stack.

## Examples

[Download the complete .nothing source](https://nothing.graphics/format/paint-stack/source.nothing) · [Source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/conformance/gradient-paint-stack.nothing)

Rendered with ncf-preview at 208 × 64.

- [Still · Ramp and paint stack](https://nothing.graphics/format/paint-stack/0.webp) at 0s. The outlined swatch at the left transitions from navy to teal. The swatch at the right uses a translucent teal paint over solid navy.

```xml
<scene width="208" height="64">
  <shape>
    <rect anchor-u="0" anchor-v="0" offset-x="8" offset-y="8" width="88" height="48" corner-radius="12"/>
    <fill>
      <paint>
        <gradient type="linear" gradientUnits="userSpaceOnUse" x1="24" y1="32" x2="80" y2="32">
          <stop offset="0" stop-color="#193661FF"/>
          <stop offset="1" stop-color="#4ABCC0FF"/>
        </gradient>
      </paint>
    </fill>
    <stroke stroke-width="2"><paint><solid color="#122947FF"/></paint></stroke>
  </shape>
  <shape>
    <rect anchor-u="0" anchor-v="0" offset-x="112" offset-y="8" width="88" height="48" corner-radius="12"/>
    <fill>
      <paint><solid color="#193661FF"/></paint>
      <paint><solid color="#4ABCC080"/></paint>
    </fill>
  </shape>
</scene>
```



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

Use each paint for a single solid, image, or gradient. Its position in the stack determines which layers are beneath it.

## Syntax [#syntax]

### Overlay a translucent color [#overlay-a-translucent-color]

The upper paint layers half-alpha teal over navy. At (144, 32), the result is approximately (50, 121, 145, 255).

```xml
<paint><solid color="#4ABCC080"/></paint>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/gradient-paint-stack.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/README.md#published-reference-examples)

## Usage context [#usage-context]

Allowed parents are [`<fill>`](https://nothing.graphics/docs/format/reference/fill), [`<stroke>`](https://nothing.graphics/docs/format/reference/stroke).

## Attributes [#attributes]

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

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

**Value** `normal`, `multiply`, `screen` · **If omitted** `normal` · **Keys** Held

Blend this layer into the paint below. The bottom paint's mode composites the assembled stack into its destination.

## Children [#children]

| Elements                                                                                                                                                                                                      | Cardinality  | Declared by | Role and source order                                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<solid>`](https://nothing.graphics/docs/format/reference/solid), [`<image>`](https://nothing.graphics/docs/format/reference/image), [`<gradient>`](https://nothing.graphics/docs/format/reference/gradient) | Exactly one  | `<paint>`   | Choose the source of this paint layer. Exactly one value.                                                                                                                                                            |
| [`<animate>`](https://nothing.graphics/docs/format/reference/animate)                                                                                                                                         | Zero or more | Animation   | A track targets one keyable property on this owner. For equal first-key times, the later track in document order wins. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation) |

## Specifications [#specifications]

* [Paint](https://nothing.graphics/docs/format/spec/graphics#paint)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
