def hex_color_for(rgb):
    """
    Convert a 3-element rgb structure to a HTML color definition
    """
    opacity_shade = 0.3
    return "rgba(%d,%d,%d,%f)" % (rgb[0], rgb[1], rgb[2], opacity_shade)