I needed to be able to generate gradients dynamically for a project I'm currently working on ..
I had the idea to create some filters to manipulate hexadecimal color codes. They are first converted to RGB, then HSV and from there I can manipulate hue, saturation and lightness to get different variations of a given color. The output is of course converted back into hexadecimal.
Here's an example used to generate a gradient:
{% load colors %}
#my_div {
/* non-css3 */
background: #{{ color }};
/* IE */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{{ color }}', endColorstr='#{{ color|lightness:"30" }}');
/* webkit */
background: -webkit-gradient(radial, left top, left bottom, from(#{{ color }}), to(#{{ color|lightness:"30" }}));
/* firefox 3.6+ */
background: -moz-linear-gradient(top, #{{ color }}, #{{ color|lightness:"30" }});
}
You can get the code and read the documentation on the project's page.
See also: http://docs.b-list.org/webcolors/1.3.1/ (a library I wrote a while back for working with CSS color specifications).
Your opninion on this topic is great, and I think that few will try to dispute it. To repeat what others have said, requires education, to challenge it, requires brains. kamagra jellies erectile disorder kamagra soft