FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Self
    

    Initializes a new instance of the ContrastBrushConverter class.

    Source

    alpha_threshold

    fn alpha_threshold(self: &Self) -> u8
    

    Gets the alpha channel threshold below which a default color is used instead of black/white.

    Source

    set_alpha_threshold

    fn set_alpha_threshold(self: &Self, value: u8)
    

    Sets alpha_threshold.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.