def norm_aplha(alpha):
    """ normalise alpha in range (0, 1)

    :param float alpha:
    :return float:

    >>> norm_aplha(0.5)
    0.5
    >>> norm_aplha(255)
    1.0
    >>> norm_aplha(-1)
    0
    """
    alpha = alpha / 255. if alpha > 1. else alpha
    alpha = 0 if alpha < 0. else alpha
    alpha = 1. if alpha > 1. else alpha
    return alpha