John Sundell a68e461eb4 Replace custom Color struct with typealiases
Now that the decision not to support colors on Linux
has been made, we can replace the custom `Color` struct
with simple typealiases for `NSColor` and `UIColor`.

The same can’t be done for font, since we want to enable
loading of a font from a path, for SPM packages.
2018-08-26 22:49:39 +02:00

20 lines
386 B
Swift

/**
* Splash
* Copyright (c) John Sundell 2018
* MIT license - see LICENSE.md
*/
#if os(iOS)
import UIKit
public typealias Color = UIColor
#elseif os(macOS)
import Cocoa
public typealias Color = NSColor
#endif
internal extension Color {
convenience init(red: CGFloat, green: CGFloat, blue: CGFloat) {
self.init(red: red, green: green, blue: blue, alpha: 1)
}
}