Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting from RGB to HSL with Objective C

I'm quite new to objective c but have been programming for a while. I started creating a function that would convert from RGB to HSL and back again but I get a feeling it is way too long and headed in the wrong direction. Does anyone know of a simple way to perform this conversion?

like image 408
treeba Avatar asked Jun 10 '10 19:06

treeba


1 Answers

NSColor is missing in iPhone SDK. You can use this utility to convert from RGB to HSL space and back:

https://github.com/alessani/ColorConverter

like image 174
Matteo Alessani Avatar answered Sep 21 '22 00:09

Matteo Alessani