Share via


ColorTheme Class

Definition

The ColorTheme can be used to make the AvatarView have a consistent look. A theme consists of a set of colors that are used and applied to a variety of properties on the AvatarView. You can also implement your own theme by implementing the IColorTheme interface.

public sealed class ColorTheme : Xamarin.CommunityToolkit.UI.Views.IColorTheme
Inheritance
System.Object
ColorTheme
Implements

Constructors

ColorTheme(Color[], Color[])

Constructor of ColorTheme where you can specify color sets for the foreground and background. Depending on the Text a random color from the set gets selected. This makes it very easy to create a consistent look.

Fields

Default

Default ColorTheme used by ColorTheme whenever a theme is not set.

Desert

A Desert inspirated ColorTheme.

Jungle

A Junge inspirated ColorTheme.

Ocean

A Ocean inspirated ColorTheme.

Volcano

A Volcano inspirated ColorTheme.

Methods

GetBackgroundColor(String)
GetForegroundColor(String)

Applies to