[−]Struct rltk::HSV
Represents an H/S/V triplet, in the range 0..1 (32-bit float)
Fields
h: f32
s: f32
v: f32
Methods
impl HSV
#[must_use]pub fn new() -> HSV
Constructs a new, zeroed (black) HSV triplet.
#[must_use]pub const fn from_f32(h: f32, s: f32, v: f32) -> HSV
Constructs a new HSV color, from 3 32-bit floats
#[must_use]pub fn to_rgba(&self, alpha: f32) -> RGBA
Converts to an RGBA value with a specified alpha level
#[must_use]pub fn to_rgb(&self) -> RGB
Converts an HSV triple to an RGB triple
#[must_use]pub fn lerp(&self, color: HSV, percent: f32) -> HSV
Trait Implementations
impl Clone for HSV
fn clone(&self) -> HSV
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for HSV
impl Debug for HSV
impl Default for HSV
impl From<HSV> for RGB
Support conversion from HSV
impl From<HSV> for RGBA
Support conversion from HSV
impl From<RGB> for HSV
Support conversion from RGB
impl From<RGBA> for HSV
Support conversion from RGBA
impl PartialEq<HSV> for HSV
impl StructuralPartialEq for HSV
Auto Trait Implementations
impl RefUnwindSafe for HSV
impl Send for HSV
impl Sync for HSV
impl Unpin for HSV
impl UnwindSafe for HSV
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,