ColorFilterExtension
A markup extension that is used to color-blend.
Definition
Namespace:Telerik.Maui.Controls.Theming
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class ColorFilterExtension : IMarkupExtension
Inheritance: objectColorFilterExtension
Implements:
Constructors
public ColorFilterExtension()
Properties
When set, will be used as Alpha in the newly generated color, and will override the base Color's Alpha.
public float? Alpha { get; set; }
Color
Color
The base color.
public Color Color { get; set; }
Expected to be in range [-1, 1]. For [-1, 0] will darken the Color, where -1 will result in black, -0.5 will be a dark version and 0 will preserve the Color. For [0, 1] will lighten the Color, where 1 will result in white, 0.5 will be a light version and 0 will preserve the Color.
Does not affect the Color's Alpha.
public float Lighten { get; set; }
TintColor
Color
Alpha blends the original Color with the TintColor one. The Red, Green, and Blue are linearly interpolated between the Color and the TintColor based on the TintColor's Alpha, the Alpha of the result preserves the Alpha of the original Color.
Useful to tint gradient shades.
public Color TintColor { get; set; }
Methods
Provides the filtered color value based on the configured properties.
public object ProvideValue(IServiceProvider serviceProvider = null)
The service provider.
Returns:The filtered color.