pub struct Color { /* private fields */ }Expand description
Represents a color with its channel values for all supported color models (RGB, CMY, and HSV).
Implementations§
Source§impl Color
impl Color
Sourcepub fn set(&mut self, property: ColorPropertyType, value: u16)
pub fn set(&mut self, property: ColorPropertyType, value: u16)
Sets a single color property and updates all DMXChannels accordingly.
CMY values are converted to RGB internally (u16::MAX - value),
HSV values are converted to RGB via Color::set_hsv.
RGB values are converted to HSV via [‘Color::set_rgb’]
Sourcepub fn get_values(&self) -> Vec<(u16, u8)>
pub fn get_values(&self) -> Vec<(u16, u8)>
Returns the current DMX output values of all active color channels.
Each entry is a (value, channel_index) pair. For channels with 16-bit
fine control, two entries are returned — coarse first, then fine.
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more