This is a read-only mirror of pymolwiki.org

Difference between revisions of "Colorblindfriendly"

From PyMOL Wiki
Jump to navigation Jump to search
m (1 revision)
(→‎Colors: show 0-255 values instead.)
Line 17: Line 17:
  
 
== Colors ==
 
== Colors ==
The 0-255 RGB values from the J*FLY page have been used and converted to decimal notation (e.g. 230/255 = 0.902).
+
These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.
 
{| cellpadding="1"
 
{| cellpadding="1"
 
|- align="center"
 
|- align="center"
 
! width="20"| ||bgcolor=#ddd width="100"|name||bgcolor=#ddd width="50"|R||bgcolor=#ddd width="50"|G||bgcolor=#ddd width="50"|B||bgcolor=#ddd|alternate names
 
! width="20"| ||bgcolor=#ddd width="100"|name||bgcolor=#ddd width="50"|R||bgcolor=#ddd width="50"|G||bgcolor=#ddd width="50"|B||bgcolor=#ddd|alternate names
 
|- align="center"
 
|- align="center"
|bgcolor=#000000| ||cb_black||0.0||0.0||0.0||
+
|bgcolor="#000000"| ||cb_black||0||0||0||
 
|- align="center"
 
|- align="center"
|bgcolor=#e69f00| ||cb_orange||0.902||0.624||0.0||
+
|bgcolor="#e69f00"| ||cb_orange||230||159||0||
 
|- align="center"
 
|- align="center"
|bgcolor=#56b4e9| ||cb_sky_blue||0.337||0.706||0.914||cb_skyblue, cb_light_blue, cb_lightblue
+
|bgcolor="#56b4e9"| ||cb_sky_blue||86||180||233||cb_skyblue, cb_light_blue, cb_lightblue
 
|- align="center"
 
|- align="center"
|bgcolor=#009e73| ||cb_bluish_green||0.0||0.62||0.451||cb_bluishgreen, cb_green
+
|bgcolor="#009e73"| ||cb_bluish_green||0||158||115||cb_bluishgreen, cb_green
 
|- align="center"
 
|- align="center"
|bgcolor=#f0e442| ||cb_yellow||0.941||0.894||0.259||
+
|bgcolor="#f0e442"| ||cb_yellow||240||228||66||
 
|- align="center"
 
|- align="center"
|bgcolor=#0072b2| ||cb_blue||0.0||0.447||0.698||
+
|bgcolor="#0072b2"| ||cb_blue||0||114||178||
 
|- align="center"
 
|- align="center"
|bgcolor=#d55e00| ||cb_vermillion||0.835||0.369||0.0||cb_red, cb_red_orange, cb_redorange
+
|bgcolor="#d55e00"| ||cb_vermillion||213||94||0||cb_red, cb_red_orange, cb_redorange
 
|- align="center"
 
|- align="center"
|bgcolor=#cc79a7| ||cb_reddish_purple||0.8||0.475||0.655||cb_reddishpurple, cb_rose, cb_violet, cb_magenta
+
|bgcolor="#cc79a7"| ||cb_reddish_purple||204||121||167||cb_rose, cb_violet, cb_magenta
 
|}
 
|}
 
  
 
== Usage ==
 
== Usage ==

Revision as of 04:04, 26 October 2017

Type Python Script
Download colorblindfriendly.py
Author(s) Jared Sampson
License MIT
This code has been put under version control in the project Pymol-script-repo


Introduction

Certain colors are indistinguishable to people with the various forms of color blindness, and therefore are better not used in figures intended for public viewing.

This script generates a palette of named colors for PyMOL that are unambiguous both to colorblind and non-colorblind individuals.

The colors listed here are defined according to recommendations found at J*FLY. This website is a good reference to consult when making all kinds of figures, not just those made using PyMOL.


Colors

These are the 0-255 RGB values from the J*FLY page that are used in the script, with the defined color names and alternate names.

  name R G B alternate names
  cb_black 0 0 0
  cb_orange 230 159 0
  cb_sky_blue 86 180 233 cb_skyblue, cb_light_blue, cb_lightblue
  cb_bluish_green 0 158 115 cb_bluishgreen, cb_green
  cb_yellow 240 228 66
  cb_blue 0 114 178
  cb_vermillion 213 94 0 cb_red, cb_red_orange, cb_redorange
  cb_reddish_purple 204 121 167 cb_rose, cb_violet, cb_magenta

Usage

Use these color names just like any other named color, using the color command:

import colorblindfriendly
color cb_skyblue, all