Skip to content

Instantly share code, notes, and snippets.

View Klowner's full-sized avatar
🤡
total bozo

Mark Riedesel Klowner

🤡
total bozo
View GitHub Profile
@Klowner
Klowner / colortemplate.py
Created February 11, 2012 07:59
Color template engine, useful for building collections of CSS files
#!/usr/bin/env python
import re
import colorsys
class ColorFunc(object):
MATCH = re.compile('^([a-z]+)\(([^\)]+)')
def __init__(self, value):
self.func_name, self.func_args = self.MATCH.match(value).groups()
self.func_args = [x.strip() for x in filter(lambda x:x, self.func_args.split(','))]