Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Created October 11, 2017 06:04
Show Gist options
  • Select an option

  • Save dmytro-anokhin/29a3cf8f0c48afe78a83c089a88b5a17 to your computer and use it in GitHub Desktop.

Select an option

Save dmytro-anokhin/29a3cf8f0c48afe78a83c089a88b5a17 to your computer and use it in GitHub Desktop.
extension Color {
var hsv: (hue: CGFloat, saturation: CGFloat, value: CGFloat) {
var r: CGFloat = 0.0
var g: CGFloat = 0.0
var b: CGFloat = 0.0
__getHue(&r, saturation: &g, value: &b)
return (hue: r, saturation: g, value: b)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment