Struct orbclient::color::Color [−][src]
#[repr(packed)]pub struct Color { pub data: u32, }
A color
Fields
data: u32
Methods
impl Color[src]
impl Colorpub const fn rgb(r: u8, g: u8, b: u8) -> Self[src]
pub const fn rgb(r: u8, g: u8, b: u8) -> SelfCreate a new color from RGB
pub const fn rgba(r: u8, g: u8, b: u8, a: u8) -> Self[src]
pub const fn rgba(r: u8, g: u8, b: u8, a: u8) -> SelfSet the alpha
pub fn r(&self) -> u8[src]
pub fn r(&self) -> u8Get the r value
pub fn g(&self) -> u8[src]
pub fn g(&self) -> u8Get the g value
pub fn b(&self) -> u8[src]
pub fn b(&self) -> u8Get the b value
pub fn a(&self) -> u8[src]
pub fn a(&self) -> u8Get the alpha value
pub fn interpolate(start_color: Color, end_color: Color, scale: f64) -> Color[src]
pub fn interpolate(start_color: Color, end_color: Color, scale: f64) -> ColorInterpolate between two colors
Trait Implementations
impl Copy for Color[src]
impl Copy for Colorimpl Clone for Color[src]
impl Clone for Colorfn clone(&self) -> Color[src]
fn clone(&self) -> ColorReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for Color[src]
impl PartialEq for ColorCompare two colors (Do not take care of alpha)
fn eq(&self, other: &Color) -> bool[src]
fn eq(&self, other: &Color) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl Debug for Color[src]
impl Debug for Color