---
title: "brightnessContrast"
description: "Adjust the child's brightness and contrast together."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.color"
categorySlug: "effects-color"
categoryTitle: "Color effects"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/color.ts#L91"
---

# brightnessContrast

Adjust the child's brightness and contrast together.

```ts
brightnessContrast(slots: {brightness: ArgSpec; contrast: ArgSpec}): PointwiseEffect
```

Import `effects` from `shaders/std` and use `effects.color.brightnessContrast`.

Both are sliders from −1 to 1 with 0 as no change. `brightness` adds to every channel. `contrast` stretches colors away from mid-gray (positive) or flattens them toward it (negative).

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{brightness: ArgSpec; contrast: ArgSpec}` |  |

## Example

```ts
effect: brightnessContrast({brightness: p('brightness'), contrast: p('contrast')})
```

> **Tip.** Declare `identityWhen: allOf(isZero('brightness'), isZero('contrast'))`.

## See also

- [`exposure`](/docs/primitives/effects-color/exposure) — Multiply the child's brightness, like opening a camera's aperture.

## Used by

[BrightnessContrast](/docs/components/brightnesscontrast)