Struct colorutils_rs::Hsv
source · pub struct Hsv {
pub h: f32,
pub s: f32,
pub v: f32,
}Expand description
Represents HSV (hue, saturation, value) colorspace, H ∈ [0, 360f32], s ∈ [0f32, 1f32], v ∈ [0f32, 1f32]
Fields§
§h: f32Hue H ∈ [0, 360f32]
s: f32Saturation s ∈ [0, 1f32]
v: f32Value v ∈ [0, 1f32]
Implementations§
source§impl Hsv
impl Hsv
pub fn new(h: u16, s: u16, l: u16) -> Hsv
pub fn from_components(h: f32, s: f32, v: f32) -> Hsv
pub fn from(rgb: Rgb<u8>) -> Hsv
pub fn to_rgb8(&self) -> Rgb<u8>
pub fn get_hue(&self) -> f32
pub fn get_saturation(&self) -> f32
pub fn get_value(&self) -> f32
pub fn get_hue_p(&self) -> u16
pub fn get_saturation_p(&self) -> u16
pub fn get_value_p(&self) -> u16
Trait Implementations§
source§impl PartialOrd for Hsv
impl PartialOrd for Hsv
impl Copy for Hsv
impl StructuralPartialEq for Hsv
Auto Trait Implementations§
impl Freeze for Hsv
impl RefUnwindSafe for Hsv
impl Send for Hsv
impl Sync for Hsv
impl Unpin for Hsv
impl UnwindSafe for Hsv
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)