Support 'darken' and 'lighten' functions, like in LESS
LESS simplifies making highlight and shadow colors based on a primary colour by having a function that can darken or lighten an existing color. I think this'd be pretty cool as it'd save the designer having to darken a color in Photoshop and then type the new value in.
Here's an example of how this might look in the NSS file, based on the current demo.
@primaryBackgroundColor: #E6E6E6;
@primaryBackgroundTintColor: lighten(@primaryBackgroundColor, 30%);
@primaryBackgroundColorTop: lighten(@primaryBackgroundColor, 50%);
@primaryBackgroundColorTop: darken(@primaryBackgroundColor, 30%);
Note you should also be able to use these functions in any place where a color can be defined (background color, border color etc).
LESS also has saturate and desaturate functions that alert the colour saturation, which may also be useful. http://lesscss.org/#reference
This request is definitely a non-essential, nice-to-have feature!
Agreed! This would be nice. Tangentially, I'd also like to consolidate the background-color-top/background-color-bottom combination into a single function, like background-color: gradient(red, yellow);.
It might make sense to wait until the new parser (#33) is implemented before doing these, though.