Module colour
[hide private]
[frames] | no frames]

Module colour

source code

Module for colour manipulation.

Functions [hide private]
float
linear_gradient(value, start, end, colour_list=None)
Return an RGB colour array of the value placed on a linear colour gradient.
source code
list of float
molmol_colours(name)
Return the RGB colour array corresponding to the Molmol colour name.
source code
list of float
x11_colours(name)
Return the RGB colour array corresponding to the X11 colour name.
source code
Variables [hide private]
  uf_tables = Uf_tables()
  _linear_gradient_doc = Desc_container("Colour")
  __molmol_colours_doc__ = Desc_container("Molmol RGB colour arr...
  __x11_colours_doc__ = Desc_container("X11 RGB colour arrays")
  table = uf_tables.add_table(label= "table: X11 colours", capti...
  __package__ = None
hash(x)

Imports: float64, array, RelaxInvalidColourError, Uf_tables, Desc_container


Function Details [hide private]

linear_gradient(value, start, end, colour_list=None)

source code 

Return an RGB colour array of the value placed on a linear colour gradient.

The argument value should be a number between zero and one. The start and end colours can either be strings or RGB colour arrays.

Parameters:
  • value (float) - The position on the gradient, ranging from zero to one.
  • start (str or list of float) - The starting colour, either the name of the colour as a string or an RGB colour array.
  • end (str or list of float) - The ending colour, either the name of the colour as a string or an RGB colour array.
  • colour_list (str) - The colour names to use, one of 'x11' or 'molmol'.
Returns: float
The position in the gradient.

molmol_colours(name)

source code 

Return the RGB colour array corresponding to the Molmol colour name.

Parameters:
  • name (str) - The Molmol colour name.
Returns: list of float
The RGB colour array.

x11_colours(name)

source code 

Return the RGB colour array corresponding to the X11 colour name.

Parameters:
  • name (str) - The X11 colour name, as defined in the /usr/X11R6/lib/X11/rgb.txt file.
Returns: list of float
The RGB colour array.

Variables Details [hide private]

__molmol_colours_doc__

Value:
Desc_container("Molmol RGB colour arrays")

table

Value:
uf_tables.add_table(label= "table: X11 colours", caption= "X11 colour \
names and corresponding RGB colour values", spacing= False, longtable=\
 True)