Table of Contents

Module: PmwColor bkchem/PmwColor.py
Imported modules   
import Tkinter
import math
import string
import sys
Functions   
_calcPalette
_recolorTree
average
bhi2saturation
bordercolors
changebrightness
changecolor
correct
getdefaultpalette
hsi2rgb
hue2name
name2rgb
rgb2brightness
rgb2hsi
rgb2name
setscheme
spectrum
  _calcPalette 
_calcPalette (
        root,
        background=None,
        **kw,
        )

Exceptions   
ValueError, 'must specify a background color'
  _recolorTree 
_recolorTree (
        widget,
        oldpalette,
        newcolors,
        )

Change the colors in a widget and its descendants.

  average 
average (
        rgb1,
        rgb2,
        fraction,
        )

  bhi2saturation 
bhi2saturation (
        brightness,
        hue,
        intensity,
        )

  bordercolors 
bordercolors ( root,  colorName )

This is the same method that Tk uses for shadows, in TkpGetShadows.

  changebrightness 
changebrightness (
        root,
        colorName,
        brightness,
        )

Convert the color name into its hue and back into a color of the required brightness.

  changecolor 
changecolor (
        widget,
        background=None,
        **kw,
        )

  correct 
correct ( rgb,  correction )

  getdefaultpalette 
getdefaultpalette ( root )

Return the default values of all options, using the defaults from a few widgets.

  hsi2rgb 
hsi2rgb (
        hue,
        saturation,
        intensity,
        )

  hue2name 
hue2name ( hue,  brightness=None )

Convert the requested hue and brightness into a color name. If hue is None, return a grey of the requested brightness.

  name2rgb 
name2rgb (
        root,
        colorName,
        asInt=0,
        )

  rgb2brightness 
rgb2brightness ( rgb )

Return the perceived grey level of the color (0.0 == black, 1.0 == white).

  rgb2hsi 
rgb2hsi ( rgb )

  rgb2name 
rgb2name ( rgb )

  setscheme 
setscheme (
        root,
        background=None,
        **kw,
        )

  spectrum 
spectrum (
        numColors,
        correction=1.0,
        saturation=1.0,
        intensity=1.0,
        extraOrange=1,
        returnHues=0,
        )


Table of Contents

This document was automatically generated on Wed Jun 1 11:05:30 2005 by HappyDoc version 2.1