sozorogami/SOZOChromoplast — pull request #2 by Dschee (2014-11-26 19:19:46+00:00)
Title: Changed "Intensity" to Brightness

If I am correct that the reason the "intensity" calculation was introduced in this framework is to make the colors readable when setting the `dominantColor` as a background color, then here's my two cents:

The important factor for readability is not the "intensity" names value used here. Instead it is the (subjective) brightness difference between two colors which can be quickly calculated like I did in this pull request by using UIColors HSB system instead of the RGB system. One could also calculate it with the RGB values, see formulas [here](http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color).

To learn more about readability and color contrasts please see [this section](http://www.w3.org/TR/AERT#color-contrast) from the W3C accessibility guide.

I have updated all constants (`kSOZOMinimumIntensityDifference` and intensity medium constant) to work with brightness calculation.

TODOs:
* One thing I didn't do (I didn't want to make merging complicated) was to rename the class `UIColor+SOZOIntensity`. That could be done to clean things up later.
* For my purposes a granularity constant set to 2 instead of 5 (like it was before) lead to much better results. But since I'm not the only one using this framework you could change the constant back to 5 if needed.