Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

For generating attractive random colors

Project Description

randomcolor [![Build Status](](

A port of [David Merfield's randomColor]( ([currently davidmerfield/randomColor@0.4.4]( to python. Tested against python versions 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, pypy, and pypy3.


Generating a completely random color:
``` python
import randomcolor
rand_color = randomcolor.RandomColor()

Generating 3 random blue colors:
``` python
print(rand_color.generate(hue="blue", count=3))

Refer to the [tests for examples]( and [README at davidmerfield/randomColor]( for full usage details.


Run `python test` to run the test suite with stored expected colors
generated from a seeded randomcolor object.

Run `python tests/` to generate an html page with random
colors generated from using this package. Open `randomcolors.html` to confirm
that the colors fall within the parameters pased in. This is in addition to unit
tests since it's much easier to visually confirm that the colors generated
are correct than determine correctness programatically.

Release History

This version
History Node

History Node

History Node

History Node

History Node

History Node

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.3 kB) Copy SHA256 Hash SHA256
Source None Oct 6, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting