FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ColorHelper

    struct · ferroui-controls-color-picker · v0.5.0

    struct ColorHelper
    

    Contains helpers useful when working with colors.

    View source

    Members

    get_relative_luminance

    fn get_relative_luminance(color: Color) -> f64
    

    Gets the relative (perceptual) luminance/brightness of the given color. 1 is closer to white while 0 is closer to black.

    Source

    to_display_name_exists

    fn to_display_name_exists() -> bool
    

    Determines if color display names are supported based on the current thread culture.

    Only English names are currently supported following known color names. In the future known color names could be localized.

    Source

    to_display_name

    fn to_display_name(color: Color) -> String
    

    Determines an approximate display name for the given color.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • MarkupTyped

    Availability

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