Struct primitives::foundation::colorschemes::Analogous
source · [−]pub struct Analogous { /* private fields */ }
Expand description
The analog colors are those colors which lie on either side of any given color.
Often these are color schemes found in nature. An application that makes use of analogous colors usually feels harmonious. The secondary color, as described above, can often be an analogous color.
Implementations
sourceimpl Analogous
impl Analogous
sourcepub fn new(primary: Color) -> Self
pub fn new(primary: Color) -> Self
Generate Analogous scheme with your color, 10 degree angle and 25 percent of contrast
sourcepub fn with_parameters(
primary: Color,
angle: Option<f32>,
contrast: Option<f32>
) -> Self
pub fn with_parameters(
primary: Color,
angle: Option<f32>,
contrast: Option<f32>
) -> Self
Generate Analogous scheme with specified parameters
sourcepub fn set_contrast(&mut self, value: f32)
pub fn set_contrast(&mut self, value: f32)
Set the contrast
sourcepub fn num_of_colors(&self) -> usize
pub fn num_of_colors(&self) -> usize
Retrieve count colors of scheme
sourcepub fn primary_color(&self) -> Color
pub fn primary_color(&self) -> Color
Retrieve primary color of scheme
sourcepub fn set_primary_color(&mut self, value: Color)
pub fn set_primary_color(&mut self, value: Color)
Set the primary color of scheme
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Analogous
impl Send for Analogous
impl Sync for Analogous
impl Unpin for Analogous
impl UnwindSafe for Analogous
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more