pub struct TemperatureCache { /* private fields */ }Expand description
The input color with its hue circle, sorted by temperature, computed once.
Implementations§
Source§impl TemperatureCache
impl TemperatureCache
Sourcepub fn analogous(&self, count: usize, divisions: usize) -> Vec<Hct>
pub fn analogous(&self, count: usize, divisions: usize) -> Vec<Hct>
count colors of differing hue, equidistant in temperature over a
wheel of divisions steps, with the input in the middle. Art usually
describes this as 5 colors on a wheel of 12. count and divisions
of 0 return only the input.
Sourcepub fn complement(&self) -> Hct
pub fn complement(&self) -> Hct
The color as far from the input in temperature as the input is from the other end: art’s color across the wheel.
Sourcepub fn relative_temperature(&self, hct: Hct) -> f64
pub fn relative_temperature(&self, hct: Hct) -> f64
Temperature relative to all colors of the same chroma and tone, 0 to 1. 0.5 when they do not differ, as at T100 where only white exists.
Sourcepub fn input_relative_temperature(&self) -> f64
pub fn input_relative_temperature(&self) -> f64
Self::relative_temperature of the input.
Trait Implementations§
Source§impl Clone for TemperatureCache
impl Clone for TemperatureCache
Source§fn clone(&self) -> TemperatureCache
fn clone(&self) -> TemperatureCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TemperatureCache
impl RefUnwindSafe for TemperatureCache
impl Send for TemperatureCache
impl Sync for TemperatureCache
impl Unpin for TemperatureCache
impl UnsafeUnpin for TemperatureCache
impl UnwindSafe for TemperatureCache
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