skillfed

django-colorfield

color field for django models with a nice color-picker in the admin.

django-colorfield v0.14.0 1.2M downloads/30d#4,262 on PyPI661
Permissive 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) Active released

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-colorfield

uv

uv add django-colorfield

poetry

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 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Build Tools

Tags

django color fielddjango color picker admindjango model color inputdjango colorfield widgetdjango hex color fieldcolor picker django admindjango color chooser
django-adminform-widgetcolor-picker

More Build Tools packages

packaging

Provides reusable utilities for Python…

permissive · top 100 on PyPI

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

pip

pip is the standard installer for Python…

permissive · top 100 on PyPI

hatchling

Hatchling is a standards-compliant Python build…

permissive · top 100 on PyPI

grpcio-tools

Generates Python gRPC service stubs and message…

permissive · top 1,000 on PyPI

pre-commit

pre-commit is a framework for installing and…

permissive · top 1,000 on PyPI

django-enumfields

Provides Django model fields that store Python…

permissive · top 15,000 on PyPI

django-taggit

Adds simple tagging functionality to Django…

permissive · top 5,000 on PyPI

django-admin-interface

Replaces Django's default admin interface with…

permissive · top 15,000 on PyPI

django-admin-env-notice

Adds a colored banner to Django Admin to…

permissive · top 15,000 on PyPI

django-choices-field

Provides Django model fields that store and…

permissive · top 15,000 on PyPI

django-phonenumbers

Provides a Django model field and form field…

permissive · top 15,000 on PyPI

djangocms-admin-style

Provides styled CSS templates and admin…

permissive · top 15,000 on PyPI

django-bootstrap-datepicker-plus

Provides Bootstrap-styled date, time, and…

permissive · top 15,000 on PyPI

django-json-widget

Provides a rich JSON editor widget for Django's…

permissive · top 5,000 on PyPI

django-dynamic-preferences

Stores and retrieves application settings…

permissive · top 15,000 on PyPI