Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(57)

Delta Between Two Patch Sets: Tools/pynche/README

Issue 15550: Trailing white spaces
Left Patch Set: Created 7 years, 8 months ago
Right Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Tools/pybench/README ('k') | Tools/scripts/dutree.doc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 Pynche - The PYthonically Natural Color and Hue Editor 1 Pynche - The PYthonically Natural Color and Hue Editor
2 2
3 Contact: Barry A. Warsaw 3 Contact: Barry A. Warsaw
4 Email: bwarsaw@python.org 4 Email: bwarsaw@python.org
5 Version: 1.3 5 Version: 1.3
6 6
7 Introduction 7 Introduction
8 8
9 Pynche is a color editor based largely on a similar program that I 9 Pynche is a color editor based largely on a similar program that I
10 originally wrote back in 1987 for the Sunview window system. That 10 originally wrote back in 1987 for the Sunview window system. That
(...skipping 30 matching lines...) Expand all
41 pynche.pyw to inhibit the console window. When run from the 41 pynche.pyw to inhibit the console window. When run from the
42 command line, the following options are recognized: 42 command line, the following options are recognized:
43 43
44 --database file 44 --database file
45 -d file 45 -d file
46 Alternate location of the color database file. Without this 46 Alternate location of the color database file. Without this
47 option, the first valid file found will be used (see below). 47 option, the first valid file found will be used (see below).
48 48
49 --initfile file 49 --initfile file
50 -i file 50 -i file
51 Alternate location of the persistent initialization file. See 51 Alternate location of the persistent initialization file. See
52 the section on Persistency below. 52 the section on Persistency below.
53 53
54 --ignore 54 --ignore
55 -X 55 -X
56 Ignore the persistent initialization file when starting up. 56 Ignore the persistent initialization file when starting up.
57 Pynche will still write the current option settings to the 57 Pynche will still write the current option settings to the
58 persistent init file when it quits. 58 persistent init file when it quits.
59 59
60 --help 60 --help
61 -h 61 -h
(...skipping 11 matching lines...) Expand all
73 73
74 Pynche can be run as a modal dialog, inside another application, 74 Pynche can be run as a modal dialog, inside another application,
75 say as a general color chooser. In fact, Grail 0.6 uses Pynche 75 say as a general color chooser. In fact, Grail 0.6 uses Pynche
76 and a future version of IDLE may as well. Pynche supports the API 76 and a future version of IDLE may as well. Pynche supports the API
77 implemented by the Tkinter standard tkColorChooser module, with a 77 implemented by the Tkinter standard tkColorChooser module, with a
78 few changes as described below. By importing pyColorChooser from 78 few changes as described below. By importing pyColorChooser from
79 the Pynche package, you can run 79 the Pynche package, you can run
80 80
81 pyColorChooser.askcolor() 81 pyColorChooser.askcolor()
82 82
83 which will popup Pynche as a modal dialog, and return the selected 83 which will popup Pynche as a modal dialog, and return the selected
84 color. 84 color.
85 85
86 There are some UI differences when running as a modal 86 There are some UI differences when running as a modal
87 vs. standalone. When running as a modal, there is no "Quit" menu 87 vs. standalone. When running as a modal, there is no "Quit" menu
88 item under the "File" menu. Instead there are "Okay" and "Cancel" 88 item under the "File" menu. Instead there are "Okay" and "Cancel"
89 buttons. 89 buttons.
90 90
91 When "Okay" is hit, askcolor() returns the tuple 91 When "Okay" is hit, askcolor() returns the tuple
92 92
93 ((r, g, b), "name") 93 ((r, g, b), "name")
94 94
95 where r, g, and b are red, green, and blue color values 95 where r, g, and b are red, green, and blue color values
96 respectively (in the range 0 to 255). "name" will be a color name 96 respectively (in the range 0 to 255). "name" will be a color name
97 from the color database if there is an exact match, otherwise it 97 from the color database if there is an exact match, otherwise it
98 will be an X11 color spec of the form "#rrggbb". Note that this 98 will be an X11 color spec of the form "#rrggbb". Note that this
99 is different than tkColorChooser, which doesn't know anything 99 is different than tkColorChooser, which doesn't know anything
100 about color names. 100 about color names.
101 101
102 askcolor() supports the following optional keyword arguments: 102 askcolor() supports the following optional keyword arguments:
103 103
104 color 104 color
105 the color to set as the initial selected color 105 the color to set as the initial selected color
106 106
107 master[*] 107 master[*]
108 the master window to use as the parent of the modal 108 the master window to use as the parent of the modal
109 dialog. Without this argument, pyColorChooser will create 109 dialog. Without this argument, pyColorChooser will create
110 its own Tkinter.Tk instance as the master. This may not 110 its own Tkinter.Tk instance as the master. This may not
111 be what you want. 111 be what you want.
112 112
113 databasefile 113 databasefile
114 similar to the --database option, the value must be a 114 similar to the --database option, the value must be a
115 file name 115 file name
116 116
117 initfile[*] 117 initfile[*]
118 similar to the --initfile option, the value must be a 118 similar to the --initfile option, the value must be a
119 file name 119 file name
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 In the lower left corner of the main window you see two larger 164 In the lower left corner of the main window you see two larger
165 color chips. The Selected chip shows you a larger version of the 165 color chips. The Selected chip shows you a larger version of the
166 color selected in the variation strips, along with its X11 color 166 color selected in the variation strips, along with its X11 color
167 specification. The Nearest chip shows you the closest color in 167 specification. The Nearest chip shows you the closest color in
168 the X11 database to the selected color, giving its X11 color 168 the X11 database to the selected color, giving its X11 color
169 specification, and below that, its X11 color name. When the 169 specification, and below that, its X11 color name. When the
170 Selected chip color exactly matches the Nearest chip color, you 170 Selected chip color exactly matches the Nearest chip color, you
171 will see the color name appear below the color specification for 171 will see the color name appear below the color specification for
172 the Selected chip. 172 the Selected chip.
173 173
174 Clicking on the Nearest color chip selects that color. Color 174 Clicking on the Nearest color chip selects that color. Color
175 distance is calculated in the 3D space of the RGB color solid and 175 distance is calculated in the 3D space of the RGB color solid and
176 if more than one color name is the same distance from the selected 176 if more than one color name is the same distance from the selected
177 color, the first one found will be chosen. 177 color, the first one found will be chosen.
178 178
179 Note that there may be more than one X11 color name for the same 179 Note that there may be more than one X11 color name for the same
180 RGB value. In that case, the first one found in the text database 180 RGB value. In that case, the first one found in the text database
181 is designated the "primary" name, and this is shown under the 181 is designated the "primary" name, and this is shown under the
182 Nearest chip. The other names are "aliases" and they are visible 182 Nearest chip. The other names are "aliases" and they are visible
183 in the Color List Window (see below). 183 in the Color List Window (see below).
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 below. By default, the X11 color name database file is selected. 354 below. By default, the X11 color name database file is selected.
355 Other files: 355 Other files:
356 356
357 html40colors.txt -- the HTML 4.0 guaranteed color names 357 html40colors.txt -- the HTML 4.0 guaranteed color names
358 358
359 websafe.txt -- the 216 "Web-safe" colors that Netscape and MSIE 359 websafe.txt -- the 216 "Web-safe" colors that Netscape and MSIE
360 guarantee will not be dithered. These are specified in #rrggbb 360 guarantee will not be dithered. These are specified in #rrggbb
361 format for both values and names 361 format for both values and names
362 362
363 webcolors.txt -- The 140 color names that Tim Peters and his 363 webcolors.txt -- The 140 color names that Tim Peters and his
364 sister say NS and MSIE both understand (with some controversy over 364 sister say NS and MSIE both understand (with some controversy over
365 AliceBlue). 365 AliceBlue).
366 366
367 namedcolors.txt -- an alternative set of Netscape colors. 367 namedcolors.txt -- an alternative set of Netscape colors.
368 368
369 You can switch between files by choosing "Load palette..." from 369 You can switch between files by choosing "Load palette..." from
370 the "File" menu. This brings up a standard Tk file dialog. 370 the "File" menu. This brings up a standard Tk file dialog.
371 Choose the file you want and then click "Ok". If Pynche 371 Choose the file you want and then click "Ok". If Pynche
372 understands the format in this file, it will load the database and 372 understands the format in this file, it will load the database and
373 update the appropriate windows. If not, it will bring up an error 373 update the appropriate windows. If not, it will bring up an error
374 dialog. 374 dialog.
375 375
376 376
377 To Do 377 To Do
378 378
379 Here's a brief list of things I want to do (some mythical day): 379 Here's a brief list of things I want to do (some mythical day):
380 380
381 - Better support for resizing the top level windows 381 - Better support for resizing the top level windows
382 382
383 - More output views, e.g. color solids 383 - More output views, e.g. color solids
384 384
385 - Have the notion of a `last color selected'; this may require a 385 - Have the notion of a `last color selected'; this may require a
386 new output view 386 new output view
387 387
388 - Support setting the font in the text view 388 - Support setting the font in the text view
389 389
390 - Support distutils setup.py for installation 390 - Support distutils setup.py for installation
391 391
392 I'm open to suggestions! 392 I'm open to suggestions!
393 393
394 394
395 395
396 396
397 Local Variables: 397 Local Variables:
398 indent-tabs-mode: nil 398 indent-tabs-mode: nil
399 End: 399 End:
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+