Skip to main content
# Django Postgresql RGB ColorField

This is a ColorField based on django's `django.contrib.postgres.ArrayField`. Though it shows Hex in admin and let you pick color, it is saving its value as a RGB array. Which is perticularly useful if you want to do query and calculation over it. e.g. Getting colors close to another.


### Requirements

1. Python 3.X
2. Postgresql database in django.


### Installation

```bash
pip install django-postgresql-rgb-colorfield
```

### Quick start

1. Add `colorfield` to your INSTALLED_APPS setting like this:

```python
INSTALLED_APPS = [
...
'colorfield',
]
```

2. Import and Use `ColorField`:

```python
from django.db import models
from colorfield.fields import ColorField
# Create your models here.

class ColorPallate(models.Model):
color1 = ColorField(null=True, blank=True)
color2 = ColorField(null=True, blank=True)
color3 = ColorField(null=True, blank=True)

def __str__(self):
return f"Pallate {self.id}"
```

Metadata

Release files for django-postgresql-rgb-colorfield 1.3.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-postgresql-rgb-colorfield 1.3.0
File Size Uploaded
django-postgresql-rgb-colorfield-1.3.0.tar.gz 23.4 kB Details

Release files / django-postgresql-rgb-colorfield-1.3.0.tar.gz

Download URL django-postgresql-rgb-colorfield-1.3.0.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3d2e6e12e1cf747415392d3b0a2d3f48937eaf28c48b49267463e02929b35bff
BLAKE2b-256 checksum
How to use checksums
fb884a85527363a7d6197ee238915e2e532c1a187e75cfd4e967674474659e6b
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/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file

1.2.5

1 release file

1.2.3

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

2 release files

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