def hsb_to_rgb(h, s, v, a):
    """Simple hsv to rgb conversion. Assumes components specified in range 0.0-1.0."""
    tmp = h * 5.9999
    hi = int(tmp)
    f = tmp - hi
    p = v * (1 - s)
    q = v * (1 - f * s)
    t = v * (1 - (1 - f) * s)
    if hi == 0:
        r, g, b = v, t, p
    elif hi == 1:
        r, g, b = q, v, p
    elif hi == 2:
        r, g, b = p, v, t
    elif hi == 3:
        r, g, b = p, q, v
    elif hi == 4:
        r, g, b = t, p, v
    else:
        r, g, b = v, p, q
    return r, g, b, a