How to apply HSB color filters to UIImage
I've been struggling for a few days for a project on UIImage colorization. The idea is that the app will embark a set of images that I will have to colorize with values retrieved from a webservice. Some sort of themes if you wish. The designer I work with gave me a background image on all of his Photoshop values. The first problem is that Photoshop uses HSL and iOS uses HSB. So the first challenge was to translate the values from Photoshop. Photoshop HSL: -28 (range -180 => +180), 100 (range -100 => +100), 25 (range -100 => +100). Luckily I found some code online, here it is . //adapted from