[−][src]Struct niko::Color
Implementations
impl Color
[src]
pub fn new(r: u8, g: u8, b: u8, a: u8) -> Self
[src]
construct a new color from red, green, blue and alpha
pub fn rgb(r: u8, g: u8, b: u8) -> Self
[src]
construct a new color from red, green and blue
pub fn into_normalized(self) -> (f32, f32, f32, f32)
[src]
returns normalized (between 0.0 and 1.0) values for all color channels
Trait Implementations
impl Add<Color> for Color
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Clone for Color
[src]
impl Copy for Color
[src]
impl Debug for Color
[src]
impl Div<Color> for Color
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Eq for Color
[src]
impl From<(u8, u8, u8, u8)> for Color
[src]
impl Into<(u8, u8, u8, u8)> for Color
[src]
impl Mul<Color> for Color
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl PartialEq<Color> for Color
[src]
impl StructuralEq for Color
[src]
impl StructuralPartialEq for Color
[src]
impl Sub<Color> for Color
[src]
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,