# PropertyColorEditor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer/struct-propertycoloreditor/

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

```rust
struct PropertyColorEditor
```

A native swatch and XAML color field with a staged spectrum/palette flyout.

`configure` never authors a value. Changes in the native `ColorView` remain local
until Apply, so a spectrum drag produces one document transaction and one undo entry.
Escape and light dismissal discard the popup draft. The owner validates every commit.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L97)

## Members

- [`new`](#function-new)
- [`control`](#function-control)
- [`text_editor`](#function-text_editor)
- [`swatch_button`](#function-swatch_button)
- [`color_view`](#function-color_view)
- [`flyout`](#function-flyout)
- [`configure`](#function-configure)
- [`on_commit`](#function-on_commit)

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

### new

```rust
fn new() -> Result<Self, String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L107)

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

### control

```rust
fn control(self: &Self) -> Ref<Control>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L326)

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

### text_editor

```rust
fn text_editor(self: &Self) -> Ref<TextBox>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L329)

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

### swatch_button

```rust
fn swatch_button(self: &Self) -> Ref<Button>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L332)

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

### color_view

```rust
fn color_view(self: &Self) -> Ref<ColorView>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L335)

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

### flyout

```rust
fn flyout(self: &Self) -> Ref<Flyout>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L338)

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

### configure

```rust
fn configure(self: &Self, value: Option<&str>, mixed: bool) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L342)

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

### on_commit

```rust
fn on_commit(self: &Self, callback: impl Fn(String) -> () + 'static)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/property_color_editor.rs#L355)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Same`

## Availability

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