diff options
| author | pepperpepperpepper <pepper@scannerjammer.com> | 2015-10-09 15:52:02 -0700 |
|---|---|---|
| committer | pepperpepperpepper <pepper@scannerjammer.com> | 2015-10-09 15:52:02 -0700 |
| commit | 42da3b72a8ee7deac3abe238fbdb1591d8d945b9 (patch) | |
| tree | 004eff4289ff5e01d8d66fbb29942cb2f94f47a9 /lib/param/color.py | |
| parent | 0c965a54861e779ca51b235e7a3c2475d8a84dfb (diff) | |
alright got rid of most relative paths
Diffstat (limited to 'lib/param/color.py')
| -rw-r--r-- | lib/param/color.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/param/color.py b/lib/param/color.py deleted file mode 100644 index 829a8f4..0000000 --- a/lib/param/color.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Defines the color param type""" -from .param import Param -import re -class Color(Param): - """Defines the color param type - Args: - value: the value of the color (string) - classname: the name of the class to which the param belongs - """ - def __init__(self, value, classname=""): - super(Color, self).__init__(classname=classname) - if value: - 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)) |
