adjustColorForState
Adjust col (sourced from .fill) for .fill_hover and .fill_press by
lightening/darkening (based on the dark field).
Parameters
- self:*const Theme
- *const Theme
- col:Color
- Color
- ask:Options.ColorAsk
- Options.ColorAsk
Source
Implementation
pub fn adjustColorForState(self: *const Theme, col: Color, ask: Options.ColorAsk) Color {
return col.lighten(switch (ask) {
.fill_hover => if (self.dark) 10 else -10,
.fill_press => if (self.dark) 20 else -20,
else => return col,
});
}