🌀color.hue
On iOS 10 or later, an extended range color space specifies the hue component and can have any value. ⭐️
Values
0.0~1.0are inside the sRGB color gamut.On earlier versions of iOS, the hue is always
0.0~1.0. 👉 UIKit
import SwiftUI
extension Color {
/// `color.hue` (0 ~ 1)
public var hue: CGFloat {
var hue: CGFloat = 0
UIColor(self).getHue(
&hue,
saturation: nil,
brightness: nil,
alpha: nil
)
return hue
}
}Core Image ⟩ Applying a Chroma Key Effect ⭐️ a.k.a. bluescreening or greenscreening.
Last updated
Was this helpful?