brightnessContrast

Adjust the child's brightness and contrast together.

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

NameTypeNotes
slots{brightness: ArgSpec; contrast: ArgSpec}

Example

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

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

See also

  • exposure — Multiply the child's brightness, like opening a camera's aperture.

Used by

BrightnessContrast