1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

colors.Color

Description

An item inside a Colors list. A Color behaves like an ordinary Python list, but with added functionality: it has a name and a weight (which ranges between 0.0 and 1.0 and represents the color's dominance in the total set). The higher its weight, the more it appears in the top of the Colors list.

Each item in a Color list is a Shade.

Example

import colors
c = colors.colors("sky", top=3)
for color in c:
  print color.name, color.weight
>>>blue 0.908263560248
>>>red 0.0809974517656
>>>orange 0.0107389879869