ContrastBrushConverter
struct · ferroui-controls-color-picker · v0.5.0
struct ContrastBrushConverter
Gets a solid color brush, 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.
This is a highly-specialized converter for the color picker.
Members
new
fn new() -> Self
Initializes a new instance of the ContrastBrushConverter class.
alpha_threshold
fn alpha_threshold(self: &Self) -> u8
Gets the alpha channel threshold below which a default color is used instead of black/white.
set_alpha_threshold
fn set_alpha_threshold(self: &Self, value: u8)
Sets alpha_threshold.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherDebugDefaultIValueConverterPartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.