ColourChooser is a dialogue box which allows the user to pick a colour from the list in rgb.txt (supplied with X Windows), or to create a colour by setting RGB (red, green, blue) values with slider controls.

You can scroll through all the named colours by using the <Down> and <Up> arrow keys on the keyboard or by clicking the mouse on the scrollbar and then clicking the colour list.

Pressing OK will return the selected colour, as a name if it has one or as an RGB value if it doesn't. (Colours which do not have names are listed as 'Unnamed' in the colour list box.) If the -hexonly option has been specified the colour is always returned as a Tk colour hex value, i.e. in the form '#HHHHHH' except if Transparent is chosen in which case 'None' is returned.

OK is pressed by a mouse click or <Return> or <o> or <Control-o> or <Alt-o>.

Cancel is pressed by a mouse click or <Escape> or <c> or <Control-c> or <Alt-c>. (Note that if the language is not english then the letter to press will be the first letter of the translation of the word 'Cancel'.

Can be slow to load because rgb.txt is large; however we now load a single instance of the colour names when the module is first used and these names are then shared.

If you scroll the list by keyboard or use the mouse to move the colour sliders the colour updates as you go; but if you use the mouse on the scrollbar you must click the colour name box for the colour to update. I don't know why this is and any advice on how to fix it would be welcome.