Struct cdg::RgbColor
[−]
[src]
pub struct RgbColor(_);
A 12-bit RGB color
Methods
impl RgbColor
[src]
fn from_rgb(r: u8, g: u8, b: u8) -> RgbColor
Convert from an RGB triplet. The individual channels are each truncated to four bits.
fn r(&self) -> u8
The red component evenly scaled to 0..255
fn g(&self) -> u8
The green component evenly scaled to 0..255
fn b(&self) -> u8
The blue component evenly scaled to 0..255
Trait Implementations
impl Copy for RgbColor
[src]
impl Eq for RgbColor
[src]
impl PartialEq for RgbColor
[src]
fn eq(&self, __arg_0: &RgbColor) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RgbColor) -> bool
This method tests for !=
.
impl Clone for RgbColor
[src]
fn clone(&self) -> RgbColor
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more