# `<inner-shadow>`

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

Tint the previous image inside its alpha silhouette.



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

An inner shadow uses offset blurred alpha to shade the previous image along its inner edges. Every input pixel retains its alpha.

## Syntax [#syntax]

### Slide tint across the image without changing alpha [#slide-tint-across-the-image-without-changing-alpha]

At frame 0, (129, 27) is teal. At frame 12 the keyed offset is 6 and that point turns red. The neighboring translucent area at (160, 27) still has alpha 128.

```xml
<inner-shadow dx="0" dy="0" sigma="0" color="#FF0000FF">
  <animate attributeName="dx" fill="freeze">
    <key frame="0" value="0" ease="linear"/>
    <key frame="24" value="12"/>
  </animate>
</inner-shadow>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/examples/inner-shadows.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/README.md#layer-effects)

## Usage context [#usage-context]

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

Includes [Gaussian blur](https://nothing.graphics/docs/format/reference/gaussian-blur), [Shadow style](https://nothing.graphics/docs/format/reference/shadow-style).

## Attributes [#attributes]

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

### `sigma` [#sigma]

**Value** local units · **If omitted** `0` · **Keys** Scalar · **Declared by** [Gaussian blur](https://nothing.graphics/docs/format/reference/gaussian-blur#sigma)

Nonnegative Gaussian standard deviation. Zero copies the input to the blur stage.

### `dx` [#dx]

**Value** local units · **If omitted** `0` · **Keys** Scalar · **Declared by** [Shadow style](https://nothing.graphics/docs/format/reference/shadow-style#dx)

Horizontal displacement, positive to the right.

### `dy` [#dy]

**Value** local units · **If omitted** `0` · **Keys** Scalar · **Declared by** [Shadow style](https://nothing.graphics/docs/format/reference/shadow-style#dy)

Vertical displacement, positive down.

### `color` [#color]

**Value** `#RRGGBBAA` · **Required** · **Keys** Color channels · **Declared by** [Shadow style](https://nothing.graphics/docs/format/reference/shadow-style#color)

Required shadow tint in encoded sRGB with linear alpha. The filter converts the sampled color to its working space.

## Children [#children]

| Elements                                                              | Cardinality  | Declared by | Role and source order                                                                                                                                                                                                |
| --------------------------------------------------------------------- | ------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<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]

* [Source filter operations](https://nothing.graphics/docs/format/spec/filters#operations)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
