# ImmutableGradientStop

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/immutable/struct-immutablegradientstop/

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

```rust
struct ImmutableGradientStop
```

Describes the location and color of a transition point in a gradient.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_gradient_stop.rs#L6)

## Members

- [`new`](#function-new)
- [`offset`](#function-offset)
- [`color`](#function-color)

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

### new

```rust
fn new(offset: f64, color: Color) -> Self
```

Creates a gradient stop. The offset is clamped to `[0, 1]`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_gradient_stop.rs#L13)

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

### offset

```rust
fn offset(self: &Self) -> f64
```

The gradient stop offset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_gradient_stop.rs#L24)

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

### color

```rust
fn color(self: &Self) -> Color
```

The gradient stop color.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_gradient_stop.rs#L30)

## 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`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- [`IGradientStop`](/docs/0.5.0/api/ferroui-base/media/trait-igradientstop/)

## Availability

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