[][src]Struct pigmnts::color::RGB

pub struct RGB {
    pub r: u8,
    pub g: u8,
    pub b: u8,
}

Fields

r: u8g: u8b: u8

Implementations

impl RGB[src]

pub fn hex(&self) -> String[src]

Converts the color to the corresponding hex color code

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

Converts the color to the corresponding XYZ color space

Trait Implementations

impl Clone for RGB[src]

impl Display for RGB[src]

impl From<&'_ HSL> for RGB[src]

impl From<&'_ LAB> for RGB[src]

fn from(color: &LAB) -> Self[src]

Creates equivalent RGB color from LAB color

impl From<&'_ RGB> for LAB[src]

fn from(color: &RGB) -> Self[src]

Creates equivalent LAB color from RGB color

impl From<&'_ RGB> for HSL[src]

impl PartialEq<RGB> for RGB[src]

impl Serialize for RGB[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,