color_list | index /home/downey/public_html/color/color_list.py |
This module provides read_colors, which takes an optional
filename as an argument and returns
colors: a dictionary that maps color names to rgb tuples
rgbs: a sorted list of pairs, where each pair is an rgb tuple
and a sorted list of color names.
An rgb tuple is a triplet of values in the range 0-255.
If the filename is provided, read_colors uses it; otherwise
it searches for the X11 color list in a file named rgb.txt.
It checks the usual places first and then uses find if necessary.
Allen B. Downey
2008
Modules | ||||||
|
Functions | ||
|