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.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 RoyGBiv 0.3.1
File Size Uploaded Provenance Actions
RoyGBiv-0.3.1.tar.gz 6.0 kB Without provenance Details for RoyGBiv-0.3.1.tar.gz

Release files / RoyGBiv-0.3.1.tar.gz

Download URL RoyGBiv-0.3.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
70023d1bef7d34d272817486bb72f459625a07dee8f5a08a76318ded061f2a42
BLAKE2b-256 checksum
How to use checksums
2dcd81960b71f92e7363215ee8fde2c6cfbb1585020cfb0679c878d4f77d59a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for RoyGBiv 0.3.1

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