Skip to main content

colors

Simple way to grab random colors using a filter string.


jake b
(ninmonkey)
Simple way to grab random colors using a filter string. Uses pygame.THECOLORS dict for colors. You can call: random_color('red') To return a random 'red' color from several reds. See screenshot.

Links

Home Page
http://code.google.com/p/ninmonkey/

Releases

colors 0.1 — 17 Jul, 2011

colors 0.1 — 16 Jul, 2011

Pygame.org account Comments

  • Jake b 2011-07-17 23:06:33

    Yes. having trouble uploading to google.

    Jake b 2011-07-18 02:21:05

    Fixed.

  • Benanddanm 2011-07-18 13:09:43

    hi

  • Benanddanm 2011-07-18 13:12:06

    it doesnt work

  • hmxela 2011-07-18 20:25:52

    You use random.choice() on the dictionary type THECOLORS in colors.py. It won't work since a dictionary is not a sequence. I found out that this works, however: 
    c = choice(THECOLORS.values())

    Jake b 2011-07-19 13:35:46

    thanks. fixed.