Skip to content

A port of David Merfield's randomColor to python.

Notifications You must be signed in to change notification settings

robwa/randomcolor-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randomcolor

A port of David Merfield's randomColor (currently davidmerfield/randomColor@58f5a89) to python.

Usage

Generating a completly random color:

import randomcolor
rand_color = randomcolor.RandomColor()
print rand_color.generate()

Generating 3 random blue colors:

print rand_color.generate(hue="blue", count=3)

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

Tests

Run python test_randomcolor.py 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 lieu of standard unit tests since it's much easier to visually confirm that the colors generated are correct than determine correctness programatically.

About

A port of David Merfield's randomColor to python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%