from django.forms import ModelForm
from django.forms.widgets import TextInput
from .models import Category


class CategoryForm(ModelForm):


    class Meta:
        model = Category
fields = '__all__'
widgets = {'color': TextInput(attrs={'type': 'color'})}
How to use HTML5 color picker in Django admin