---
title: "tintToward"
description: "Mix the child's color toward one color by an amount, leaving its alpha alone."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "filter"
categorySlug: "filter"
categoryTitle: "Filter effects"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/filter.ts#L47"
---

# tintToward

Mix the child's color toward one color by an amount, leaving its alpha alone.

```ts
tintToward(color: PropRef, opts: {amount: ScalarInput}): TintTowardEffect
```

Import `tintToward` from `shaders/std`.

`color` is a color prop. `amount` runs 0 (no change) to 1 (fully that color) and can be a number, a prop, or a value that varies per pixel such as a mask. Pointwise.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `color` | `PropRef` |  |
| `opts` | `{amount: ScalarInput}` |  |

## Example

```ts
effect: tintToward(p('color'), {amount: radialMask({center: p('center'), radius: p('radius'), falloff: p('falloff')}).times(p('intensity'))})
```

> **Tip.** Pair it with `identityWhen: isZero('intensity')` so the filter costs nothing at zero.

## See also

- [`paintThrough`](/docs/primitives/filter/paintthrough) — Show a paint through the child, so the child becomes the mask.
- [`pointwise`](/docs/primitives/filter/pointwise) — Write your own pointwise effect: a function of the child's color at this pixel.

## Used by

[Vignette](/docs/components/vignette)