Author: Maxime Haineault (max@motion-m.ca)
http://motion-m.ca/projets/django-colors/ http://code.google.com/p/django-colors/
Django colors is a small django app that we created to make our life easier while designing websites with the Django framework.
The app consist of a set of template filters which can manipulate hexadecimal colors. For example, you can easily increase or decrease the lightness or the saturation of a color:
{% load colors %}
Lorem <b style="background:#{{ "00ffff"|lightness:"40" }};">Ipsum <b style="background:{{ "0ff"|opposite|hex_to_rgb:"rgb(%d,%d,%d)" }};"> Dolor
{# Rendered #}
Lorem Ipsum Dolor
There is two ways to install this library. You can install it system wide or use it within your project.
sudo python setup.py install
Simply add the "colors" folder in your PYTHONPATH or copy it in your project folder.
1 Add 'colors' to your INSTALLED_APPS in settings.py