Apply cargo fmt

This commit is contained in:
2026-09-10 11:49:20 +02:00
parent ada2c3d89d
commit 4884aca3dd
8 changed files with 302 additions and 122 deletions
+2 -1
View File
@@ -129,7 +129,8 @@ pub fn blend(fg: Color32, bg: Color32, strength: f32) -> Color32 {
/// Black or white, whichever stays readable on `background`.
pub fn contrasting_text(background: Color32) -> Color32 {
let luma = 0.299 * background.r() as f32 + 0.587 * background.g() as f32
let luma = 0.299 * background.r() as f32
+ 0.587 * background.g() as f32
+ 0.114 * background.b() as f32;
if luma > 150.0 {
Color32::from_rgb(0x1e, 0x1e, 0x24)