Skip to main content

An extension to the Django web framework that provides a database and form field to accept and store colors in the RGB format.

GitHub Actions https://coveralls.io/repos/charettes/django-colorful/badge.svg?branch=master&service=github

Installation

>>> pip install django-colorful

Make sure 'colorful' is in your INSTALLED_APPS:

INSTALLED_APPS.append('colorful')

Usage

In order to use a color field you just have to add it to your model definition:

from django.db import models
from colorful.fields import RGBColorField

class Tag(models.Model):
    color = RGBColorField()

The RGBColorField class also accepts a color keyword argument which can be set to a list of colors that should be visible as preset color palette:

color = RGBColorField(colors=['#FF0000', '#00FF00', '#0000FF'])

The ColorFieldWidget should take care of providing a JavaScript based shim on browsers that don’t support the HTML5 color input.

Metadata

Release files for django-colorful 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-colorful 1.4.0
File Size Uploaded
django_colorful-1.4.0.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-colorful 1.4.0
File Interpreter ABI Platform
django_colorful-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / django_colorful-1.4.0.tar.gz

Download URL django_colorful-1.4.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f668374b20f6d8135a2de4534ca0d6d8bdb3d46235db8664a8d8532e5af0f66e
BLAKE2b-256 checksum
How to use checksums
5b592c441ba96424aed004dc68e2ee1f2b0ed45f5074a9ed4c26d8f797567ba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / django_colorful-1.4.0-py3-none-any.whl

Download URL django_colorful-1.4.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e9f5371cd62ae0e06ae2e0a12ac87dbd2d8bddf84c6cc325423bb3f71662a6d
BLAKE2b-256 checksum
How to use checksums
422b10e586b93b52f7b976e01ca9e2f848130ee24e3af7462a1e571fb4c54ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3

2 release files

1.2

2 release files

1.1.0

2 release files

1.0.1

1 release file

1.0.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page