def render(self, name, value, attrs=None):
        rendered = super(ColorPickerWidget, self).render(name, value, attrs)
        return rendered + mark_safe(
            u'''<script type="text/javascript">
                $('#id_%s').ColorPicker({
                onSubmit: function(hsb, hex, rgb, el) {
                    $(el).val(hex);
                    $(el).ColorPickerHide();
                },
                onBeforeShow: function () {
                    $(this).ColorPickerSetColor(this.value);
                }
             }).bind('keyup', function(){
                 $(this).ColorPickerSetColor(this.value);
             });
            </script>''' % name)
dataset/ETHPy150Open bitmazk/django-libs/django_libs/widgets.py/ColorPickerWidget.render/original