sproutcore/sproutcore — pull request #751 by tim-evans (2012-03-15 20:58:17+00:00)
Title: SC.Color

Introducing `SC.Color`! This is part of my animation work that will convert *any* valid CSS color into a `SC.Color` object. This provides methods for turning `SC.Color` objects into hex representations (a lá `#baddab` and `#bad`), `rgb(a)` representations, `hsl(a)` representations, and for IE, ARGB (for use with IE gradient filters).

`SC.Color` also provides KVC support that makes creating a color picker using `SC.SliderView` a breeze. Simply bind the `backgroundColor` property to `cssText` and the `r`, `g`, and `b` properties to the sliders.

This has been created for the purposes of providing a CSS3 transition polyfill, but should be treated as completely independent code.