pub struct HSVColor {
pub alpha: f64,
pub hue: f64,
pub saturation: f64,
pub value: f64,
}Expand description
A color represented using alpha, hue, saturation, and value.
Fields§
§alpha: f64Alpha, from 0.0 to 1.0.
hue: f64Hue, from 0.0 to 360.0.
saturation: f64Saturation, from 0.0 to 1.0.
value: f64Value, from 0.0 to 1.0.
Implementations§
Source§impl HSVColor
impl HSVColor
Sourcepub fn from_ahsv(alpha: f64, hue: f64, saturation: f64, value: f64) -> HSVColor
pub fn from_ahsv(alpha: f64, hue: f64, saturation: f64, value: f64) -> HSVColor
Creates a color. All arguments must be in their respective ranges.
Sourcepub fn with_alpha(self, alpha: f64) -> HSVColor
pub fn with_alpha(self, alpha: f64) -> HSVColor
Returns a copy of this color with the alpha parameter replaced.
Sourcepub fn with_hue(self, hue: f64) -> HSVColor
pub fn with_hue(self, hue: f64) -> HSVColor
Returns a copy of this color with the hue parameter replaced.
Sourcepub fn with_saturation(self, saturation: f64) -> HSVColor
pub fn with_saturation(self, saturation: f64) -> HSVColor
Returns a copy of this color with the saturation parameter replaced.
Sourcepub fn with_value(self, value: f64) -> HSVColor
pub fn with_value(self, value: f64) -> HSVColor
Returns a copy of this color with the value parameter replaced.
Trait Implementations§
impl Copy for HSVColor
impl StructuralPartialEq for HSVColor
Auto Trait Implementations§
impl Forget for HSVColor
impl Freeze for HSVColor
impl Move for HSVColor
impl RefUnwindSafe for HSVColor
impl Send for HSVColor
impl Sync for HSVColor
impl Unpin for HSVColor
impl UnsafeUnpin for HSVColor
impl UnwindSafe for HSVColor
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