lukashed/itunes-colors — pull request #4 by miletbaker (2013-04-24 09:49:30+00:00)
Title: Fixes and tweeks to match logic of Panic's original Cocoa source code.

Hi, thanks for porting Panics code to coffee/js. I was having issues with your code not finding the same colours as Panic's OS X app and in some cases failing to find the text colours, so I implemented a few fixes detailed below:

* Changed threshold for selecting second choice background colour to be 30% used, from 40% to match Panic's original source.
* Fixed issue with reversed logic on whether to find dark colour for text.
* Fixed issue with reversed logic for selecting secondary text colour.
* Fixed issue where colours were being passed for arrays when calling colour helper methods (now only colours are passed).
* Adjusted logic of final condition in isDistinct method to match Panic's logic (was using 1st colour for test rather than second).
* Removed duplicate / redundant logic from isDistinct method. Recompiled app.js

I have tested it against the desktop app and am now getting exactly the same results.

Regards,

Jon