Apply cargo fmt
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user