Struct mutils::Colour[][src]

pub struct Colour { /* fields omitted */ }

Implementations

impl Colour[src]

pub const WHITE: Colour[src]

pub const BLACK: Colour[src]

pub const MAGENTA: Colour[src]

pub const CYAN: Colour[src]

pub const YELLOW: Colour[src]

pub const fn new(red: f32, green: f32, blue: f32, alpha: f32) -> Self[src]

pub fn new_rgba(red: u8, green: u8, blue: u8, alpha: u8) -> Self[src]

pub fn new_rgb_hex(rgb_hex: u32) -> Self[src]

pub fn new_rgba_hex(rgb_hex: u32) -> Self[src]

pub fn red(&self) -> f32[src]

pub fn red_u8(&self) -> u8[src]

pub fn red_u32(&self) -> u32[src]

pub fn green(&self) -> f32[src]

pub fn green_u8(&self) -> u8[src]

pub fn green_u32(&self) -> u32[src]

pub fn blue(&self) -> f32[src]

pub fn blue_u8(&self) -> u8[src]

pub fn blue_u32(&self) -> u32[src]

pub fn alpha(&self) -> f32[src]

pub fn alpha_u8(&self) -> u8[src]

pub fn alpha_u32(&self) -> u32[src]

pub fn mix(self, other: Self, mut amount: f32) -> Self[src]

pub fn mix_no_alpha(self, other: Self, mut amount: f32) -> Self[src]

pub fn to_rgba_u32(self) -> u32[src]

Trait Implementations

impl Add<Colour> for Colour[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Colour> for Colour[src]

impl Clone for Colour[src]

impl Copy for Colour[src]

impl Debug for Colour[src]

impl Div<Colour> for Colour[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<f32> for Colour[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<Colour> for Colour[src]

impl DivAssign<f32> for Colour[src]

impl Mul<Colour> for Colour[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32> for Colour[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<Colour> for Colour[src]

impl MulAssign<f32> for Colour[src]

impl PartialEq<Colour> for Colour[src]

impl Rem<Colour> for Colour[src]

type Output = Self

The resulting type after applying the % operator.

impl StructuralPartialEq for Colour[src]

impl Sub<Colour> for Colour[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Colour> for Colour[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.