Invert

class Invert(val amount: Float = 1.0f) : EffectSpec(source)

Turn every color into its negative.

Each channel is reflected about mid grey, so black and white trade places and every hue becomes the one opposite it. A partial amount moves each channel that fraction of the way towards its reflection, which is what filter: invert() in a browser does.

On an export that keeps an HDR grade the reflection is anchored at SDR white, so anything brighter than reference white inverts to black.

Throws

when amount is not a finite number.

Constructors

Link copied to clipboard
constructor(amount: Float = 1.0f)

Properties

Link copied to clipboard

How far to invert, where 0f leaves the frame unchanged and 1f is the full negative. Values outside that range are clamped to it.

Link copied to clipboard
Link copied to clipboard
open override val id: String
Link copied to clipboard
open val isInert: Boolean
Link copied to clipboard
Link copied to clipboard
open val scope: EffectScope
Link copied to clipboard
open override val stage: EffectStage