-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added color bride to improve Dark Mode compatibility
- Loading branch information
1 parent
f697e28
commit dcbdf1c
Showing
3 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
130 changes: 130 additions & 0 deletions
130
FlinkChallenge/FlinkChallenge/Extensions/Color+UIColor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// | ||
// Color+UIColor.swift | ||
// FlinkChallenge | ||
// | ||
// Created by Fernando Martin Garcia Del Angel on 19/02/20. | ||
// Copyright © 2020 Fernando Martin Garcia Del Angel. All rights reserved. | ||
// Color bride created by: https://medium.com/@masamichiueta/bridging-uicolor-system-color-to-swiftui-color-ef98f6e21206 | ||
// | ||
|
||
import UIKit | ||
import SwiftUI | ||
|
||
extension Color { | ||
|
||
static var label: Color { | ||
return Color(UIColor.label) | ||
} | ||
|
||
static var secondaryLabel: Color { | ||
return Color(UIColor.secondaryLabel) | ||
} | ||
|
||
static var tertiaryLabel: Color { | ||
return Color(UIColor.tertiaryLabel) | ||
} | ||
|
||
static var quaternaryLabel: Color { | ||
return Color(UIColor.quaternaryLabel) | ||
} | ||
|
||
static var systemFill: Color { | ||
return Color(UIColor.systemFill) | ||
} | ||
|
||
static var secondarySystemFill: Color { | ||
return Color(UIColor.secondarySystemFill) | ||
} | ||
|
||
static var tertiarySystemFill: Color { | ||
return Color(UIColor.tertiarySystemFill) | ||
} | ||
|
||
static var quaternarySystemFill: Color { | ||
return Color(UIColor.quaternarySystemFill) | ||
} | ||
|
||
static var systemBackground: Color { | ||
return Color(UIColor.systemBackground) | ||
} | ||
|
||
static var secondarySystemBackground: Color { | ||
return Color(UIColor.secondarySystemBackground) | ||
} | ||
|
||
static var tertiarySystemBackground: Color { | ||
return Color(UIColor.tertiarySystemBackground) | ||
} | ||
|
||
static var systemGroupedBackground: Color { | ||
return Color(UIColor.systemGroupedBackground) | ||
} | ||
|
||
static var secondarySystemGroupedBackground: Color { | ||
return Color(UIColor.secondarySystemGroupedBackground) | ||
} | ||
|
||
static var tertiarySystemGroupedBackground: Color { | ||
return Color(UIColor.tertiarySystemGroupedBackground) | ||
} | ||
|
||
static var systemRed: Color { | ||
return Color(UIColor.systemRed) | ||
} | ||
|
||
static var systemBlue: Color { | ||
return Color(UIColor.systemBlue) | ||
} | ||
|
||
static var systemPink: Color { | ||
return Color(UIColor.systemPink) | ||
} | ||
|
||
static var systemTeal: Color { | ||
return Color(UIColor.systemTeal) | ||
} | ||
|
||
static var systemGreen: Color { | ||
return Color(UIColor.systemGreen) | ||
} | ||
|
||
static var systemIndigo: Color { | ||
return Color(UIColor.systemIndigo) | ||
} | ||
|
||
static var systemOrange: Color { | ||
return Color(UIColor.systemOrange) | ||
} | ||
|
||
static var systemPurple: Color { | ||
return Color(UIColor.systemPurple) | ||
} | ||
|
||
static var systemYellow: Color { | ||
return Color(UIColor.systemYellow) | ||
} | ||
|
||
static var systemGray: Color { | ||
return Color(UIColor.systemGray) | ||
} | ||
|
||
static var systemGray2: Color { | ||
return Color(UIColor.systemGray2) | ||
} | ||
|
||
static var systemGray3: Color { | ||
return Color(UIColor.systemGray3) | ||
} | ||
|
||
static var systemGray4: Color { | ||
return Color(UIColor.systemGray4) | ||
} | ||
|
||
static var systemGray5: Color { | ||
return Color(UIColor.systemGray5) | ||
} | ||
|
||
static var systemGray6: Color { | ||
return Color(UIColor.systemGray6) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters