def get_color(value, alpha):
    """Return color depending on value type"""
    color = QColor()
    for typ in COLORS:
        if isinstance(value, typ):
            color = QColor(COLORS[typ])
    color.setAlphaF(alpha)
    return color
def get_color ( value , alpha ) : color = QColor ( ) for typ in COLORS : if isinstance ( value , typ ) : color = QColor ( COLORS [ typ ] ) color . setAlphaF ( alpha ) return color
Return color depending on value type