Author: bugman Date: Mon Oct 6 23:40:47 2008 New Revision: 7540 URL: http://svn.gna.org/viewcvs/relax?rev=7540&view=rev Log: Converted the linear_gradient() docstring to epytxt format and added a module docstring. Modified: 1.3/colour.py Modified: 1.3/colour.py URL: http://svn.gna.org/viewcvs/relax/1.3/colour.py?rev=7540&r1=7539&r2=7540&view=diff ============================================================================== --- 1.3/colour.py (original) +++ 1.3/colour.py Mon Oct 6 23:40:47 2008 @@ -20,6 +20,9 @@ # # ############################################################################### +# Module docstring. +"""Module for colour manipulation.""" + # Python module imports. from numpy import float64, array @@ -30,8 +33,21 @@ def linear_gradient(value, start, end, colour_list=None): """Return an RGB colour array of the value placed on a linear colour gradient. - The argment value should be a number between zero and one. The start and end colours can + The argument value should be a number between zero and one. The start and end colours can either be strings or RGB colour arrays. + + @param value: The position on the gradient, ranging from zero to one. + @type value: float + @param start: The starting colour, either the name of the colour as a string or an RGB + colour array. + @type start: str or list of float + @param end: The ending colour, either the name of the colour as a string or an RGB + colour array. + @type end: str or list of float + @keyword colour_list: The colour names to use, one of 'x11' or 'molmol'. + @type colour_list: str + @return: The position in the gradient. + @rtype: float """ # Translate the end colour to RGB arrays if necessary.