Skip to content

Commit 1837bcf

Browse files
committed
Added systemDownedBackground and systemDownedGroupedBackground.
1 parent c028cf8 commit 1837bcf

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,31 @@ extension UIColor {
292292
return .systemOrange
293293
}
294294
#endif
295+
296+
/**
297+
SparrowKit: New color to system stack.
298+
Its color for empty aread and it usually downed of main background color.
299+
*/
300+
#if os(iOS)
301+
@available(iOS 13.0, *)
302+
public static var systemDownedBackground: UIColor {
303+
let lightColor = UIColor.secondarySystemBackground.mixWithColor(.darkGray, amount: 0.09).mixWithColor(UIColor.systemBlue, amount: 0.01)
304+
let darColor = UIColor.secondarySystemBackground
305+
return UIColor.init(light: lightColor, dark: darColor)
306+
}
307+
#endif
308+
309+
/**
310+
SparrowKit: New color to system grouped stack.
311+
Its color for empty aread and it usually downed of content background color.
312+
*/
313+
#if os(iOS)
314+
@available(iOS 13.0, *)
315+
public static var systemDownedGroupedBackground: UIColor {
316+
let lightColor = UIColor.systemGroupedBackground.mixWithColor(.darkGray, amount: 0.09).mixWithColor(UIColor.systemBlue, amount: 0.01)
317+
let darColor = UIColor.secondarySystemGroupedBackground.alpha(0.7)
318+
return UIColor.init(light: lightColor, dark: darColor)
319+
}
320+
#endif
295321
}
296322
#endif

0 commit comments

Comments
 (0)