ColorHelper
struct · ferroui-controls-color-picker · v0.5.0
struct ColorHelper
Contains helpers useful when working with colors.
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.
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.
to_display_name
fn to_display_name(color: Color) -> String
Determines an approximate display name for the given color.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.