django-colorfield
color field for django models with a nice color-picker in the admin.
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 on this page — 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
django-colorfield on PyPI
pip
pip install django-colorfielduv
uv add django-colorfieldpoetry
poetry add django-colorfieldInstalling 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 | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Pillow |
| Maintenance | actively maintained — 471 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,178,445/month — #4,262 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_colorfield-0.14.0-py3-none-any.whl
Keywords: django, colorfield, colorpicker, color, field, picker, chooser, admin, python
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
django-enumfieldsProvides Django model fields that store Python…
permissive · top 15,000 on PyPI
django-taggitAdds simple tagging functionality to Django…
permissive · top 5,000 on PyPI
django-admin-interfaceReplaces Django's default admin interface with…
permissive · top 15,000 on PyPI
django-admin-env-noticeAdds a colored banner to Django Admin to…
permissive · top 15,000 on PyPI
django-choices-fieldProvides Django model fields that store and…
permissive · top 15,000 on PyPI
django-phonenumbersProvides a Django model field and form field…
permissive · top 15,000 on PyPI
djangocms-admin-styleProvides styled CSS templates and admin…
permissive · top 15,000 on PyPI
django-bootstrap-datepicker-plusProvides Bootstrap-styled date, time, and…
permissive · top 15,000 on PyPI
django-json-widgetProvides a rich JSON editor widget for Django's…
permissive · top 5,000 on PyPI
django-dynamic-preferencesStores and retrieves application settings…
permissive · top 15,000 on PyPI