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.

https://travis-ci.org/charettes/django-colorful.svg?branch=master 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.

Release files for django-colorful-scybear 1.2.1

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-scybear 1.2.1
File Size Uploaded
django-colorful-scybear-1.2.1.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-colorful-scybear 1.2.1
File Interpreter ABI Platform
django_colorful_scybear-1.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 19.3 kB

Release files / django-colorful-scybear-1.2.1.tar.gz

Download URL django-colorful-scybear-1.2.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5ec119b810bd6d6ca991353c6fad878b49ac87cd4b6399eb2d05ba0f25ddfda9
BLAKE2b-256 checksum
How to use checksums
a6ec0b08fcb30f48889c9cb45edbf9d467e257cb43f182ba27e766ac07f25a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

Release files / django_colorful_scybear-1.2.1-py2.py3-none-any.whl

Download URL django_colorful_scybear-1.2.1-py2.py3-none-any.whl
Size 10.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e70cf21805da69159bf9200e35fd7d70bb0f9166f508360887813289d36cdba1
BLAKE2b-256 checksum
How to use checksums
0d7d5b406befe5d0171341cc07013e4bddc54eee1e62669e271e1f6f94039211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

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