Remove bump hack in theme::palette

This commit is contained in:
Héctor Ramón Jiménez 2025-08-05 10:06:38 +02:00
parent 0857eb3bde
commit 6e78bea2d2
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 9 additions and 11 deletions

View file

@ -525,11 +525,9 @@ pub struct Secondary {
impl Secondary {
/// Generates a set of [`Secondary`] colors from the base and text colors.
pub fn generate(base: Color, text: Color) -> Self {
let bump = if is_dark(base) { 0.0 } else { 0.01 };
let weak = mix(deviate(base, 0.1 + bump), text, 0.4);
let base = mix(deviate(base, 0.3 + bump), text, 0.4);
let strong = mix(deviate(base, 0.5 + bump), text, 0.4);
let weak = mix(deviate(base, 0.1), text, 0.4);
let base = mix(deviate(base, 0.3), text, 0.4);
let strong = mix(deviate(base, 0.5), text, 0.4);
Self {
base: Pair::new(base, text),