pub struct Backdrop {
pub surfaces: Vec<Color>,
pub parts: Vec<Color>,
pub text: Vec<Color>,
}Expand description
What a ramp is drawn with in a theme, when it is known: the ramp is
then fitted to it (Ramp::fitted).
Fields§
§surfaces: Vec<Color>Where step 9 is drawn as text (an accent on panels, a keyword in
an editor): it reaches FITTED_RATIO on each.
parts: Vec<Color>Where step 9 is drawn as a part to see (a slider’s fill on its track): it reaches 3:1 (3.1, for rounding) on each when the scheme’s direction allows.
text: Vec<Color>Text drawn on steps 3 to 5 (a selection): those steps move away
from it until it reaches FITTED_RATIO.
Implementations§
Source§impl Backdrop
impl Backdrop
Sourcepub const SURFACES: &'static [&'static str]
pub const SURFACES: &'static [&'static str]
Where an accent’s step 9 is drawn as text, in the contrast pairs: the surfaces, the editor’s background, and what a badge on the accent is written in.
Sourcepub const PARTS: &'static [&'static str]
pub const PARTS: &'static [&'static str]
Where it is drawn as a part to see: a slider’s and a progress bar’s track.
Sourcepub const TEXT: &'static [&'static str]
pub const TEXT: &'static [&'static str]
The text drawn on its quiet steps (the selection is step 5).
Sourcepub fn from_tokens(color: impl Fn(&str) -> Option<Color>) -> Backdrop
pub fn from_tokens(color: impl Fn(&str) -> Option<Color>) -> Backdrop
The backdrop of an accent in a theme, its colours read by path
(Backdrop::SURFACES, Backdrop::PARTS, Backdrop::TEXT);
a path without a colour is left out.