Skip to content

Commit

Permalink
Merge pull request #3 from giulio92/develop
Browse files Browse the repository at this point in the history
Add ability to force a color gamut
  • Loading branch information
Giulio authored Nov 3, 2017
2 parents b14f044 + 68c05f4 commit 7e3af1e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Classes/GLColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,16 @@ public extension UIColor {
}
}
}

@available(iOS 10.0, *)
public extension GLColor {
final var p3Gamut: UIColor {
let color: CIColor = CIColor(color: self)
return UIColor(displayP3Red: color.red, green: color.green, blue: color.blue, alpha: color.alpha)
}

final var sRGBGamut: UIColor {
let color: CIColor = CIColor(color: self)
return UIColor(red: color.red, green: color.green, blue: color.blue, alpha: color.alpha)
}
}

0 comments on commit 7e3af1e

Please sign in to comment.