35 lines
741 B
Swift
35 lines
741 B
Swift
|
//
|
||
|
// UIColor+App.swift
|
||
|
// Reader
|
||
|
//
|
||
|
// Created by Shadowfacts on 1/9/22.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
|
||
|
extension UIColor {
|
||
|
|
||
|
static let appBackground = UIColor { traitCollection in
|
||
|
switch traitCollection.userInterfaceStyle {
|
||
|
case .dark:
|
||
|
return UIColor(white: 0.1, alpha: 1)
|
||
|
case .unspecified, .light:
|
||
|
fallthrough
|
||
|
@unknown default:
|
||
|
return .white
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static let appContentPreviewLabel = UIColor { traitCollection in
|
||
|
switch traitCollection.userInterfaceStyle {
|
||
|
case .dark:
|
||
|
return .lightGray
|
||
|
case .unspecified, .light:
|
||
|
fallthrough
|
||
|
@unknown default:
|
||
|
return .darkGray
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|