pub struct Ramp {
pub steps: [Color; 12],
pub contrast: Color,
}Expand description
A ramp and the text colour on its solid step.
Fields§
§steps: [Color; 12]Steps 1 to 12 (steps[0] is step 1).
contrast: ColorThe text that reads on step 9 and step 10 (a scale’s contrast).
Implementations§
Source§impl Ramp
impl Ramp
Sourcepub fn new(seed: Color, scheme: Scheme) -> Ramp
pub fn new(seed: Color, scheme: Scheme) -> Ramp
The ramp of a seed in a scheme (the seed clamped first).
Sourcepub fn fitted(seed: Color, scheme: Scheme, backdrop: &Backdrop) -> Ramp
pub fn fitted(seed: Color, scheme: Scheme, backdrop: &Backdrop) -> Ramp
The ramp of a seed in a scheme, fitted to what a theme draws it with: step 9 moves on (darker in light, lighter in dark) until it also reads on the backdrop’s surfaces and is seen on its parts, and steps 3 to 5 move away from its text until it reads on them.
Trait Implementations§
impl Copy for Ramp
impl StructuralPartialEq for Ramp
Auto Trait Implementations§
impl Freeze for Ramp
impl RefUnwindSafe for Ramp
impl Send for Ramp
impl Sync for Ramp
impl Unpin for Ramp
impl UnsafeUnpin for Ramp
impl UnwindSafe for Ramp
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