Remove a redundant assert; reference luminance as a property.
Add support for generalized info about the selected color. Show the constrasting color, the complementary color, and the triadic colors. Reorganize the interface a bit to fit all that in somewhat nicely.
-contrastingColor, to pick a color that will contrast well. -complementaryColor, to pick a color that complements this one. -triadicColors, to pick two colors that complement this one. -analogousColors, to pick n colors that complement this one.
Add conversions to and from the hsb (hsv) color space, properties to access the hsb components of a color, and a class method to create a color given hsb components.
Add luminance property, refactoring luminance calculation out of -colorByLuminanceMapping
+colorWithName: no longer keeps its own cache. Instead it just calls +namedColors and then asks that cache for its key. This means that the entire color cache is initialized the first time +colorWithName: is called.
+ (NSDictionary *)namedColors returns a complete dictionary mapping color name to color for all the named colors we know.
- Add support for closetNamedColor. The closest named color is now shown, along with a color well that shows the actual color. - Change the background color of each slider to be the pure R,G, or B value that it contributes to the current color. - Always update the title color as the color changes. This means the Action button doesn't add any benefit at the moment.
closestColor name returns the name of the named color that is the best match to color.
randomColor was completely broken by inverse maths.
Since the lightening and darkening methods basically lighten a color to a given MIN or MAX limit point, change their method names to reflect that, using "To" rather than "With" to help illustrate what they they lighten "to" a color rather than "with" a color.
… is implemented as colorByLuminanceMapping
Define a new private category UIColor_Expanded_Support which contains support methods not intended to be exposed to the user. Every method defined in UIColor_Expanded must have a corresponding definition in the header file. Any private methods used purely for support must go in the new UIColor_Expanded_Support category.
The 1TBS states that inserting a new line of code anywhere should be valid. This means that all multi-line if statements must use braces. Therefore, either insert braces or convert multi-line if statements to single-line if statements wherever appropriate.
Update all methods to have a consistent whitespace style. Object types now always have a space separating the class name and the splat. Stop using K&R style; put the opening brace of a function on the same line as the function's definition.
Also wrap the UIColor_Undocumented category interface in #if SUPPORTS_UNDOCUMENTED_API
+[UIColor colorWithName:] accepts any of the CSS 3 color names. Modified by Kevin Ballard <firstname.lastname@example.org>
…entation Adds the UIColor.rgbHex property and +[UIColor colorWithRGBHex:]
…tions Adds the folowing methods: -[UIColor colorByLuminanceMapping] -[UIColor colorByMultiplyingByRed:green:blue:alpha:] -[UIColor colorByAddingred:green:blue:alpha:] -[UIColor colorByLighteningWithRed:green:blue:alpha:] -[UIColor colorByDarkeningWithRed:green:blue:alpha:] -[UIColor colorByMultiplyingBy:] -[UIColor colorByAdding:] -[UIColor colorByLighteningWithWith:] -[UIColor colorByDarkeningWith:] -[UIColor colorByMultiplyingByColor:] -[UIColor colorByAddingColor:] -[UIColor colorByLighteningWithColor:] -[UIColor colorByDarkeningWithColor:]