Skip to main content

OpaqueColorConversion

Trait OpaqueColorConversion 

Source
pub trait OpaqueColorConversion<T> {
    // Required methods
    fn to_rgb(self) -> T;
    fn from_rgb(value: T) -> Color;
}
Expand description

Converts to/from RGB

Required Methods§

Source

fn to_rgb(self) -> T

Source

fn from_rgb(value: T) -> Color

Sets alpha to 255

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§