Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Colorblindfriendly
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Import as a module === [[File:colorblindfriendly_menu.png|thumb|Screenshot of the <code>cb_colors</code> color menu in the OpenGL GUI in PyMOL 2.0.]] After importing the module, call the <code>set_colors()</code> function to add the colors to PyMOL's color palette. Then, use these color names just like any other named color, using the <code>[[color]]</code> command. <syntaxhighlight lang="python"> import colorblindfriendly as cbf # Add the new colors cbf.set_colors() color cb_red, myObject </syntaxhighlight> The colors can also be made to replace the built-in colors (i.e. they are created both with and without the "<code>cb_</code>" prefix.). Do this by passing the <code>replace</code> keyword argument. <syntaxhighlight lang="python"> # Replace built-in colors with cbf ones cbf.set_colors(replace=True) color yellow, myOtherObject # actually cb_yellow </syntaxhighlight> One can also add an entry to the color menu in the right-side OpenGL GUI. So clicking on [C], there will now be a <code>cb_colors</code> menu item, which expands to give all the color blind-friendly colors, except black, which is available in the <code>grays</code> menu. <syntaxhighlight lang="python"> # Add a `cb_colors` menu to the OpenGL GUI (see screenshot) # This will also add the colors if `set_colors()` hasn't yet been run. cbf.add_menu() </syntaxhighlight>
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Colorblindfriendly
(section)
Add topic