is there a way I can save the color palette to a file? I realize it seems to be saved as a user setting somewhere because it always pops up again in the same configuration as the previous session, but I would like to be able to back it up intentionally if possible. Also, is it possible to save/load various palettes? thanks, -Jeff --
Hi Jeff, Not sure whether you mean the color palette in the "Color Editor" dialog or the "Surface Color" dialog. The first one comes up when you press any color button in Chimera and has a row of (initially black) squares at the bottom that you can drag colors into. It's values are saved in your Chimera preferences files, ~/.chimera/preferences. The Surface Color dialog only saves the colors in sessions when the color map is being used to color some surface. Neither of these have the option to save or load colors from a separate file, though I agree that would be useful. Tom
Hi Jeff, If you are saving colors in the Color Editor, it can be called up from under Tools... Utilities as well as by clicking color wells. An alternative to using the Color Editor palette (whose colors are saved in your preferences file, as Tom said) is to have various Chimera command scripts that define a bunch of colors with the "colordef" command. I have used this approach several times. You can have all your favorites in one file, or have separate command files for separate sets of definitions. Simply opening the Chimera command file will define the colors. With the Preferences, Midas section (only present when the Command Line is shown) you can also designate any of these files to be read automatically the first time you show the Command Line during a use of Chimera. http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/colordef.html http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/preferences.html#Midas Example file contents (these just have RGB values; you could also use RGBA to define transparent colors): ----- colordef dgreen 0.0 0.5 0.1 colordef orange 1.0 0.4 0.0 colordef ocher 0.9 0.5 0.0 colordef pink 1.0 0.5 0.7 colordef purple 0.3 0.0 0.5 colordef lpurple 0.7 0.4 0.9 colordef lilac 0.4 0.4 1.0 colordef lblue 0.0 0.5 1.0 colordef mblue 0.0 0.25 1.0 colordef lgreen 0.4 1.0 0.5 colordef lgray 0.8 0.8 0.8 colordef dgray 0.3 0.3 0.3 colordef hotpink 0.9 0.0 0.5 colordef brown 0.6 0.2 0.1 colordef seagreen 0.0 0.65 0.5 colordef dseagreen 0.0 0.4 0.3 colordef flesh 0.9 0.65 0.5 colordef tan 0.65 0.45 0.25 colordef sky 0.6 0.8 1.0 ----- Elaine C. Meng, Ph.D. meng@cgl.ucsf.edu UCSF Computer Graphics Lab and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco http://www.cgl.ucsf.edu/home/meng/index.html On Nov 25, 2007, at 7:06 PM, William Jeffrey Triffo wrote:
is there a way I can save the color palette to a file?
I realize it seems to be saved as a user setting somewhere because it always pops up again in the same configuration as the previous session, but I would like to be able to back it up intentionally if possible. Also, is it possible to save/load various palettes?
thanks,
-Jeff
--
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
I was coloring surfaces (picking with cntrl-left_click and then using accelerator 'co'), but I thought the dialog said 'Color Editor'. -Jeff Tom Goddard wrote:
Hi Jeff,
Not sure whether you mean the color palette in the "Color Editor" dialog or the "Surface Color" dialog. The first one comes up when you press any color button in Chimera and has a row of (initially black) squares at the bottom that you can drag colors into. It's values are saved in your Chimera preferences files, ~/.chimera/preferences. The Surface Color dialog only saves the colors in sessions when the color map is being used to color some surface. Neither of these have the option to save or load colors from a separate file, though I agree that would be useful.
Tom
-- ------------------------------------------------------------- Jeff Triffo Auer Group, Donner Lab, Lawrence Berkeley National Laboratory Raphael Group, Bioengineering Department, Rice University Medical Scientist Training Program (MSTP), Baylor College of Medicine phone (Berkeley): 510-486-7940 fax (Berkeley): 510-486-6488
Hi Jeff, I forgot to mention that the while the "colordef command file" approach does not automatically place the colors in the Color Editor, you can show a predefined color in that tool by entering its name in the "Color name" field. Although this field usually shows a Tk color code, it accepts the name of any known color, either built into Chimera or previously defined with colordef. This is not quite as nice as having the colors appear automatically in the palette, I concede. I use colordef command files when I intend to use those color names in other commands rather than via the Color Editor. Elaine
Hi Jeff, The color editor dialog shown with the "co" keyboard shortcut is the same as the one you see when pressing on color buttons. The colors shown at the bottom of that dialog are saved in the preferences files automatically. If you wanted to preserve them you could copy your ~/.chimera/preferences file to a file named "preferences" say in a directory with the figures you made with those colors. If you start Chimera in that directory (from a terminal window) it will use the file named "preferences" in that directory if it exists instead of the default ~/.chimera/preferences. I've added a request to support multiple color palettes to our Chimera plans page (will appear tomorrow). http://www.cgl.ucsf.edu/chimera/plans.html Tom
participants (4)
-
Elaine Meng
-
Thomas Goddard
-
Tom Goddard
-
William Jeffrey Triffo