Advanced Visualization: Working with Palettes

This short protocol reviews how to work with color palettes in Cytoscape.

Color Palettes

Cytoscape supports pre-defined palettes for choosing visualization colors. Three palette types are supported:

  • Sequential: used for gradients with only positive or negative values
  • Divergent: used for gradients with both positive and negative values
  • Qualitative: used for discrete color mapping

By default, the following palettes are provided:

  • ColorBrewer: provides all three palette types
  • Viridis: provides sequential palettes
  • Built-in: built-in Rainbow palettes, Rainbow OSC, and Random qualitative palettes.

Continuous Mapping Palette

The palette used for the default continuous mapper is the Red-Blue BrewerColor palette. To switch to a different BrewerColor palette, click the Current Palette button at the top. It is also possible to reverse any palette by selecting the reverse colors option.


Annotation Panel

Palettes are also used to select colors, when a current palette is defined. For example, clicking on the Node Fill Color selector to select a boundary color brings up the palettes:


For more information on using color in network visualization, see the Ten Simple Rules protocol.