File: _web_example7.py

package info (click to toggle)
nodebox-web 1.9.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,904 kB
  • ctags: 1,602
  • sloc: python: 7,582; ansic: 581; xml: 239; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Color themes from Kuler.

import web

# Get the current most popular themes.
themes = web.kuler.search_by_popularity()

# Display colors from the first theme.
for i in range(100):
    for r, g, b in themes[0]:
        print r, g, b
        # the code below assumes the availability of methods 
        # defined in NodeBox.
        #fill(r, g, b, 0.8)
        #rotate(random(360))
        #s = random(50) + 10
        #oval(random(300), random(300), s, s)