diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-09-21 14:20:13 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-09-21 14:20:13 -0700 |
| commit | b29b0ec5f11dd66434cbdfba5287c4777d7f8ac9 (patch) | |
| tree | f02f45661bdab855d8392e14ba6448546586bf37 /Param/Color | |
| parent | 8f2230b7c866320e3839d6812b98b8370a7ec5d9 (diff) | |
new file structure
Diffstat (limited to 'Param/Color')
| -rw-r--r-- | Param/Color/.__init__.py | 0 | ||||
| -rw-r--r-- | Param/Color/__init__.py | 17 |
2 files changed, 0 insertions, 17 deletions
diff --git a/Param/Color/.__init__.py b/Param/Color/.__init__.py deleted file mode 100644 index e69de29..0000000 --- a/Param/Color/.__init__.py +++ /dev/null diff --git a/Param/Color/__init__.py b/Param/Color/__init__.py deleted file mode 100644 index 9163338..0000000 --- a/Param/Color/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -from Param import Param -import re -class ParamColor(Param): - def __init__(self, value, classname=""): - super(ParamColor, self).__init__(classname=classname) - try: - self.value = self._color_sanitize(value) - except Exception as e: - self.err_warn("Unable to sanitize the color: %s" % str(value)) - self.err_warn(str(e)) - def _color_sanitize(self, s): - if s == "": - return "transparent" - if re.match('(rgba?\([0-9]+,[0-9]+,[0-9]+\))|([a-zA-Z]+)|(\#[A-Ha-h0-9]+)', s): - return s.replace(' ', ''); - else: - self.err_warn("Not a color: {}\n".format(s)) |
