--- id: django-colorfield version: "0.14.0" license: MIT License Copyright (c) 2013-present Jared Forsyth / Fabio Caccamo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) license_treatment: permissive maintenance: active --- # django-colorfield — color field for django models with a nice color-picker in the admin. License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does django-colorfield is a Django app that provides a ColorField model field and corresponding form field for storing and editing color values. It integrates a JavaScript color picker (Coloris) into Django's admin interface, letting you select colors visually rather than typing hex codes. The field validates color format (hex, hexa, rgb, rgba) and can optionally extract dominant colors from uploaded images or present a curated palette of choices. You install it by adding the app to INSTALLED_APPS, then declare color fields in your models just like any other Django field. It works with both ModelForm and plain Form contexts, and requires only Pillow as a dependency for image processing when using the image_field option. Use it for: - Store theme or branding colors in a Django model with admin UI color picker instead of manual hex entry. - Auto-extract a dominant color from user-uploaded images and store it alongside the image field. - Provide a restricted or suggested color palette in admin forms using the samples or choices option. - Accept color input in plain Django forms outside of model context with format validation. - Build multi-format color storage (hex, rgb, rgba) with consistent validation across model and form layers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds a color field to Django models with an interactive color picker widget in the admin interface, supporting multiple color formats (hex, hexa, rgb, rgba). Yes. It is actively maintained, has no known vulnerabilities, low install friction, and solves a common Django admin UX problem cleanly. The MIT license poses no restrictions. Install it if you need color fields in Django models with a polished admin interface. ## Install pip install django-colorfield uv add django-colorfield poetry add django-colorfield ## Installing django-colorfield Before you install: Low friction: pure Python wheel with only Pillow as a runtime dependency. Actively maintained with recent commits and a stable release history since 2013. License in practice: MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install django-colorfield # In settings.py INSTALLED_APPS = [..., 'colorfield'] # In models.py from colorfield.fields import ColorField from django.db import models class MyModel(models.Model): color = ColorField(default='#FF0000') Django must be installed and configured; run `python manage.py collectstatic` after adding to INSTALLED_APPS. Verify before relying: - Whether auto-population from image top-left pixel works reliably across all image formats and edge cases. - Performance impact when using color samples or choices with large palettes in admin forms. ## Package facts - License: MIT License Copyright (c) 2013-present Jared Forsyth / Fabio Caccamo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django color field, django color picker admin, django model color input, django colorfield widget, django hex color field, color picker django admin, django color chooser, django-admin, form-widget, color-picker [View on SkillFed](https://skillfed.io/packages/django-colorfield) · [View on PyPI](https://pypi.org/project/django-colorfield/)