mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 21:02:08 +08:00
1.1.3 -> 1.1.4 第56次更新
This commit is contained in:
parent
73de1516ea
commit
dc73a30540
@ -17,7 +17,7 @@ internal static class ForegroundGenerator
|
|||||||
double blueContrast = Math.Min(Math.Abs(hue - 206.57), 360 - Math.Abs(hue - 206.57));
|
double blueContrast = Math.Min(Math.Abs(hue - 206.57), 360 - Math.Abs(hue - 206.57));
|
||||||
double redContrast = Math.Min(Math.Abs(hue - 4.11), 360 - Math.Abs(hue - 4.11));
|
double redContrast = Math.Min(Math.Abs(hue - 4.11), 360 - Math.Abs(hue - 4.11));
|
||||||
|
|
||||||
return (blackContrast >= 4 && whiteContrast >= 3 ? null :
|
return (blackContrast >= 5.5 && whiteContrast >= 2.5 ? null :
|
||||||
blackContrast >= whiteContrast ? Colors.Black : Colors.White,
|
blackContrast >= whiteContrast ? Colors.Black : Colors.White,
|
||||||
(Color)ColorConverter.ConvertFromString(blueContrast >= redContrast ? "#2196f3" : "#f44336"));
|
(Color)ColorConverter.ConvertFromString(blueContrast >= redContrast ? "#2196f3" : "#f44336"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user