'Shade *color* using normal vectors given by *normals*.
*color* can also be an array of the same length as *normals*.'

def _shade_colors(self, color, normals):

    shade = np.array([(np.dot((n / proj3d.mod(n)), [(-1), (-1), 0.5]) if proj3d.mod(n) else np.nan) for n in normals])
    mask = (~ np.isnan(shade))
    if (len(shade[mask]) > 0):
        norm = Normalize(min(shade[mask]), max(shade[mask]))
        shade[(~ mask)] = min(shade[mask])
        color = mcolors.to_rgba_array(color)
        alpha = color[:, 3]
        colors = ((0.5 + (norm(shade)[:, np.newaxis] * 0.5)) * color)
        colors[:, 3] = alpha
    else:
        colors = np.asanyarray(color).copy()
    return colors
