Skip to main content

button_palette

Function button_palette 

Source
pub fn button_palette(base: Color) -> (Color, Color, Color)
Expand description

A button’s three backgrounds from one base colour: the base, a hover a step toward white, a pressed a step toward black. The steps are the distances the stock button’s own trio sits at, so an accent-painted button reads as the same control in a different colour.

Public because “a button in this colour” is the same question with a different answer, and the arithmetic should not be re-guessed per app.