Skip to main content
# RoyGBiv

This python module is intended to provide a set of image analysis tools. This is very much a work in progress...

_by Giv Parvaneh_
- Demo: http://roygbiv.givp.org/

## Requirements

- Python 2.6+
- Python Imaging Library (PIL)
- NumPy
- ColorMath

Then ```pip install RoyGBiv```

## Usage

```python
>>> from roygbiv import *
>>> roy = Roygbiv('test.png')
>>> roy.get_average_hex()
'#468489'
>>> roy.get_average_rgb()
(70, 132, 137)
>>> roy.get_palette_rgb()
[(87, 145, 138), (52, 126, 140), (44, 97, 117), (154, 168, 145), (199, 194, 158)]
>>> roy.get_palette_hex()
['#57918a', '#347e8c', '#2c6175', '#9aa891', '#c7c29e']
```

## Available methods

- `get_average_hex()` return the average color in the image and return as a hex string
- `get_average_rgb()` return the average color in the image and return as RGB tuple
- `get_palette()` return a list of all prominent colors in the image with prominence weight value
- `get_palette_rgb()` return a list of all prominent colors in RGB
- `get_palette_hex()` return a list of all prominent colors in hex

## Credits

A lot of this code is borrowed from the most excellent [Colorific](https://github.com/99designs/colorific/ "Colorific") project but modified to work with Python 2.6 + other tweaks

Metadata

Release files for RoyGBiv 0.3

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

Source distribution (sdist)

Source distribution for RoyGBiv 0.3
File Size Uploaded Provenance Actions
RoyGBiv-0.3.tar.gz 5.8 kB Without provenance Details for RoyGBiv-0.3.tar.gz

Release files / RoyGBiv-0.3.tar.gz

Download URL RoyGBiv-0.3.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
19e5750c60bbd1184d68d0624d52fb90c614ee2cda3ba19ab1b57b7e5a6df693
BLAKE2b-256 checksum
How to use checksums
13a4a3b9ba92eadc19a63c1c434869c4a3535f22089549eb277c9770c4897604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for RoyGBiv 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

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