(self, v)
return (0.0, 0.0, 0.0, 1.0)
Returns the color corresponding to the given color index.

        @param v: numerical index of the color to be retrieved
        @return: a 4-tuple containing the RGBA values
Returns the color corresponding to the given color index.
Returns the color corresponding to the given color index .
def _get(self, v):
        """Returns the color corresponding to the given color index.

        @param v: numerical index of the color to be retrieved
        @return: a 4-tuple containing the RGBA values"""
        colors = self._colors
        for i in range(len(self._indices) - 1):
            if self._indices[i] <= v and self._indices[i + 1] >= v:
                dist = self._dists[i]
                ratio = float(v - self._indices[i]) / dist
                return tuple(
                    [
                        colors[i][x] * (1 - ratio) + colors[i + 1][x] * ratio
                        for x in range(4)
                    ]
                )
        return (0.0, 0.0, 0.0, 1.0)
def _get ( self , v ) : colors = self . _colors for i in range ( len ( self . _indices ) - 1 ) : if self . _indices [ i ] <= v and self . _indices [ i + 1 ] >= v : dist = self . _dists [ i ] ratio = float ( v - self . _indices [ i ] ) / dist return tuple ( [ colors [ i ] [ x ] * ( 1 - ratio ) + colors [ i + 1 ] [ x ] * ratio for x in range ( 4 ) ] ) return ( 0.0 , 0.0 , 0.0 , 1.0 )