ColorContrast UIColor extension in Swift to calculate brightness, color contrast, and more. Simply download the ColorContrast Swift Playground and run it! There are colors tests at the bottom of the file to test out the code.