# InvertEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/library/struct-inverteffect/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct InvertEffect
```

Inverts the colours of the content (Effector's `InvertEffect`): each
colour channel `c` becomes `c + amount * (1 - 2 c)`, `amount` clamped to
0..1; the alpha is kept.

`invert(amount=1)`. The graph is a linear transfer
(`Transfer.RedSlope`, `Transfer.RedOffset`, ...).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library.rs#L467)

## Members

- [`amount`](#struct_field-amount)
- [`matrix`](#function-matrix)

<a id="struct_field-amount"></a>

### amount

```rust
amount: f64
```

How far inverted, 0 (unchanged) to 1 (default 1).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library.rs#L469)

<a id="function-matrix"></a>

### matrix

```rust
fn matrix(self: &Self) -> ColorMatrix
```

The colour matrix of the effect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library.rs#L486)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- [`CustomEffect`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffect/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
