Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install roygbiv

How to install RoyGBiv

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install roygbiv
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.3.1 Available View build log
 
Author
License
http://www.opensource.org/licenses/mit-license.php
Dependencies
Imports
Lastest release
version 0.3.1 on Jan 9th, 2014

# 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

Docutils System Messages

System Message: ERROR/3 (<string>, line 5); backlink

Unknown target name: "parvaneh".

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.