KnownColors
struct · ferroui-base · v0.5.0
struct KnownColors
Lookups between color names and known colors.
Members
get_known_color
fn get_known_color(s: &str) -> KnownColor
Gets the known color with the given name (ASCII case-insensitive), or
KnownColor::NONE when there is no such color.
get_known_color_name
fn get_known_color_name(rgb: u32) -> Option<&'static str>
Gets the name of the known color with the given ARGB value. When several names share the value, the first one in declaration order is returned.
try_get_known_color_name
fn try_get_known_color_name(rgb: u32) -> Option<&'static str>
Same as get_known_color_name.
values
fn values() -> impl Iterator<Item = KnownColor>
The known colors in ascending order of their ARGB values, one per
value: the counterpart of Enum.GetValues<KnownColor>() without
None (which the original lists first) and without the second name of
a shared value, which has the same value and the same name
(get_known_color_name).
to_color
const fn to_color(color: KnownColor) -> Color
Converts the known color to a Color.
get_known_brush
fn get_known_brush(s: &str) -> Option<Rc<ImmutableSolidColorBrush>>
Gets the cached brush of the known color with the given name (ASCII
case-insensitive), or None when there is no such color.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.