def hex_to_rgb(value):
    value = value.lstrip('#')
    lv = len(value)
    return tuple(int(value[i:i + lv / 3], 16) for i in xrange(0, lv, lv / 3))
Make sure JSON model can filter regex
dataset/ETHPy150Open DTVD/rainbowstream/rainbowstream/pure_image.py/hex_to_rgb--crossover with--dataset/ETHPy150Open bradjasper/django-jsonfield/jsonfield/tests.py/JSONFieldTest.test_normal_regex_filter