Skip to main content

selection_floor_ramp

Function selection_floor_ramp 

pub fn selection_floor_ramp(
    theme: &Theme,
    state: SelectionState,
    ground: AlphaColor<Srgb>,
) -> AlphaColor<Srgb>
Expand description

The face of a control that has its own floor (a filled rest face rather than a transparent one), for state, standing on ground: one ordered ramp from the ground, so rest, hover and active are each further from the ground than the last on every material, and no state mixes a floor with the transparent tier.

Every rung is the ground’s own Colors::lift_on — the same OKLCH ramp and the same theme response the hover tier takes (selection_tier, selection_tier_on) — and the rest face sits at a FLOOR_REST_SHARE of the theme’s hover lift, never above it. A control with a floor and a control without therefore agree on how loud a hover is, and a palette whose surface ladder is squeezed near black cannot lift an idle face past a hovered one.