From bc9a2738314ea117debeba8de11cc2c5698a01d7 Mon Sep 17 00:00:00 2001 From: Shadow Cat Date: Sat, 20 Sep 2025 19:55:29 -0400 Subject: [PATCH] name lol --- src/layout/color.rs | 4 ++-- src/testing/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layout/color.rs b/src/layout/color.rs index 4b4d98e..01f0457 100644 --- a/src/layout/color.rs +++ b/src/layout/color.rs @@ -67,11 +67,11 @@ impl Color { self.map_rgb(|x| T::from(x.to() + amt)) } - pub fn darken(self, amt: f32) -> Self { + pub fn darker(self, amt: f32) -> Self { self.mul_rgb(1.0 - amt) } - pub fn brighten(self, amt: f32) -> Self { + pub fn brighter(self, amt: f32) -> Self { self.map_rgb(|x| { let x = x.to(); T::from(x + (1.0 - x) * amt) diff --git a/src/testing/mod.rs b/src/testing/mod.rs index aacddb2..282a340 100644 --- a/src/testing/mod.rs +++ b/src/testing/mod.rs @@ -157,10 +157,10 @@ impl Client { let rect = rect(color) .id_on(Sense::click(), move |id, ctx: &mut Client, _| { ctx.ui[main].inner.set_static(to); - ctx.ui[id].color = color.darken(0.3); + ctx.ui[id].color = color.darker(0.3); }) .edit_on(Sense::HoverStart | Sense::unclick(), move |r, _| { - r.color = color.brighten(0.2); + r.color = color.brighter(0.2); }) .edit_on(Sense::HoverEnd, move |r, _| { r.color = color;