Struct roccat_vulcan_api_rs::ColorRgb [−][src]
pub struct ColorRgb { /* fields omitted */ }
Expand description
RGB color representation
Example
use roccat_vulcan_api_rs::{ColorBuffer, ColorRgb}; let _buffer = ColorBuffer::from_element(ColorRgb::new(255, 255, 255));
Implementations
Retrn the color as a u32 encoded as 0x00_RR_GG_BB
Example
use roccat_vulcan_api_rs::ColorRgb; let color = ColorRgb::new(0xFF, 0xC5, 0x09); let number = 0x00_FF_C5_09_u32; assert_eq!(color.into_u32(), number);
Create the color form a u32.
The number is encoded as 0x**_RR_GG_BB
, where **
are droped bites.
Example
use roccat_vulcan_api_rs::ColorRgb; let number = 0x00_FF_C5_09_u32; let color = ColorRgb::from_u32(number); assert_eq!(color, ColorRgb::new(0xFF, 0xC5, 0x09));
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ColorRgb
impl UnwindSafe for ColorRgb
Blanket Implementations
Mutably borrows from an owned value. Read more