frenzy-ios/Reader/UIColor+App.swift

59 lines
1.5 KiB
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(red: 25/255, green: 25/255, blue: 25/255, alpha: 1)
case .unspecified, .light:
fallthrough
@unknown default:
return .white
}
}
static let appSecondaryBackground = UIColor { traitCollection in
switch traitCollection.userInterfaceStyle {
case .dark:
return UIColor(white: 0.2, alpha: 1)
case .unspecified, .light:
fallthrough
@unknown default:
return UIColor(white: 0.8, alpha: 1)
}
}
static let appCellHighlightBackground = UIColor { traitCollection in
switch traitCollection.userInterfaceStyle {
case .dark:
return UIColor(white: 0.15, alpha: 1)
case .unspecified, .light:
fallthrough
@unknown default:
return UIColor(white: 0.9, alpha: 1)
}
}
static let appContentPreviewLabel = UIColor { traitCollection in
switch traitCollection.userInterfaceStyle {
case .dark:
return .lightGray
case .unspecified, .light:
fallthrough
@unknown default:
return .darkGray
}
}
static let appTintColor = UIColor.systemRed
}