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 colour. Fixed issue where colours were being passed for arrays (now only colours are passed). Adjusted logic of final condition in isDistinct method to match Panic's logic. Removed duplicate / redundant logic from isDistinct method. Recompiled app.js