# ColorChangedEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-color-picker/struct-colorchangedeventargs/

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

```rust
struct ColorChangedEventArgs
```

Holds the details of a ColorChanged event.

HSV color information is intentionally not provided.
Use `Color::to_hsv` to obtain it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.ColorPicker/color_changed_event_args.rs#L11)

## Members

- [`new`](#function-new)
- [`old_color`](#function-old_color)
- [`new_color`](#function-new_color)

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

### new

```rust
fn new(old_color: Color, new_color: Color) -> Self
```

Initializes a new instance of the `ColorChangedEventArgs` class.

`old_color` is the old/original color from before the change event;
`new_color` is the new/updated color that triggered the change event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.ColorPicker/color_changed_event_args.rs#L21)

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

### old_color

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

Gets the old/original color from before the change event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.ColorPicker/color_changed_event_args.rs#L26)

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

### new_color

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

Gets the new/updated color that triggered the change event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.ColorPicker/color_changed_event_args.rs#L31)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`

## Availability

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