def alpha_dec_normalize(dec):

    temp = float(dec)
    if temp < 0.0 or temp > 1.0:
        dec = fmt_float(clamp(float(temp), 0.0, 1.0), 3)
    alpha_dec = dec
    alpha = "%02X" % round_int(float(alpha_dec) * 255.0)
    return alpha, alpha_dec
Normailze a deciaml alpha value.
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper_util.py/alpha_dec_normalize