# SystemAccentColors

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-macos/accents/struct-systemaccentcolors/

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

```rust
struct SystemAccentColors
```

The accent colour of the system and its shades, as resources.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L29)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`ACCENT_KEY`](#assoc_const-accent_key)
- [`ACCENT_DARK1_KEY`](#assoc_const-accent_dark1_key)
- [`ACCENT_DARK2_KEY`](#assoc_const-accent_dark2_key)
- [`ACCENT_DARK3_KEY`](#assoc_const-accent_dark3_key)
- [`ACCENT_LIGHT1_KEY`](#assoc_const-accent_light1_key)
- [`ACCENT_LIGHT2_KEY`](#assoc_const-accent_light2_key)
- [`ACCENT_LIGHT3_KEY`](#assoc_const-accent_light3_key)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`accent_colors`](#function-accent_colors)
- [`calculate_accent_shades`](#function-calculate_accent_shades)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L44)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<SystemAccentColors>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L44)

<a id="assoc_const-accent_key"></a>

### ACCENT_KEY

```rust
const ACCENT_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L93)

<a id="assoc_const-accent_dark1_key"></a>

### ACCENT_DARK1_KEY

```rust
const ACCENT_DARK1_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L94)

<a id="assoc_const-accent_dark2_key"></a>

### ACCENT_DARK2_KEY

```rust
const ACCENT_DARK2_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L95)

<a id="assoc_const-accent_dark3_key"></a>

### ACCENT_DARK3_KEY

```rust
const ACCENT_DARK3_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L96)

<a id="assoc_const-accent_light1_key"></a>

### ACCENT_LIGHT1_KEY

```rust
const ACCENT_LIGHT1_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L97)

<a id="assoc_const-accent_light2_key"></a>

### ACCENT_LIGHT2_KEY

```rust
const ACCENT_LIGHT2_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L98)

<a id="assoc_const-accent_light3_key"></a>

### ACCENT_LIGHT3_KEY

```rust
const ACCENT_LIGHT3_KEY: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L99)

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

### construct

```rust
fn construct() -> Self
```

Field initialisation; see `ResourceProvider::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L104)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L119)

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

### accent_colors

```rust
fn accent_colors(color_values: Option<&PlatformColorValues>) -> (Color, AccentColorShades)
```

The accent colour and its shades for the colour values of the
platform: the shades the system reports where it reports them (as
WinUI reads them from `UISettings`), the shades computed from the
accent otherwise; the default accent without platform settings.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L145)

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

### calculate_accent_shades

```rust
fn calculate_accent_shades(accent_color: Color) -> (Color, Color, Color, Color, Color, Color)
```

The shades of an accent colour: three darker and three lighter ones.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.MacOS/Accents/system_accent_colors.rs#L170)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`ResourceProviderImplExt`](/docs/0.5.0/api/ferroui-base/controls/trait-resourceproviderimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<SystemAccentColors>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`ResourceProviderImpl`](/docs/0.5.0/api/ferroui-base/controls/trait-resourceproviderimpl/)

## Availability

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