You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2021. It is now read-only.
for x in 1...10 {
print("\(CGFloat(x) / CGFloat(10) * 100)%")
print("final color: \(UIColor(hexString: "#95A4A5")!.darken(byPercentage: CGFloat(x) / CGFloat(10))!.hexValue())")
}
i get this output:
10.0%
final color: #7D8A8B
20.0%
final color: #667172
30.0%
final color: #4F5758
40.0%
final color: #383E3F
50.0%
final color: #212525
60.0%
final color: #0A0B0C
70.0%
final color: #FFFFFFF4FFFFFFF3FFFFFFF3
80.0%
final color: #FFFFFFDDFFFFFFDAFFFFFFDA
90.0%
final color: #FFFFFFC6FFFFFFC0FFFFFFC0
100.0%
final color: #FFFFFFAFFFFFFFA7FFFFFFA7
shouldnt the %100 percentage be equal or less than #FFFFFF?
When i run this code:
i get this output:
shouldnt the %100 percentage be equal or less than #FFFFFF?