ContrastBrushConverter Class
Gets a SolidColorBrush, either black or white, depending on the luminance of the supplied color. A default color supplied in the converter parameter may be returned if alpha is below the set threshold.
Definition
Namespace: Avalonia.Controls.Primitives.Converters
Assembly: Avalonia.Controls.ColorPicker (in Avalonia.Controls.ColorPicker.dll)
- C#
- VB
- F#
public class ContrastBrushConverter : IValueConverter
Public Class ContrastBrushConverter
Implements IValueConverter
type ContrastBrushConverter =
class
interface IValueConverter
end
Inheritance | Object → ContrastBrushConverter |
Implements | IValueConverter |
Remarks
This is a highly-specialized converter for the color picker.
Constructors
ContrastBrushConverter() | Initializes a new instance of the ContrastBrushConverter class |
Properties
AlphaThreshold | Gets or sets the alpha channel threshold below which a default color is used instead of black/white. |
Methods
Convert(Object, Type, Object, CultureInfo) | Converts a value. |
ConvertBack(Object, Type, Object, CultureInfo) | Converts a value. |
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
GetHashCode() | Serves as the default hash function. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() | Returns a string that represents the current object. (Inherited from Object) |