import colorsys

channels = [
    255,  # dimmer
    0,    # R
    0,    # G
    0,    # B
    0,    # W
    0,    # A
    0,    # UV
    0,    # Strobe
    0,    # function
    0,    # function speed
]

start_addr = 1

def display(t, payload):
    r, g, b = colorsys.hls_to_rgb(t, 0.5, 1)

    #channels[1] = int(255 * r)
    #channels[2] = int(255 * g)
    #channels[3] = int(255 * b)
    channels[4] = 0
    channels[5] = 0
    channels[6] = 255
    channels[7] = 0

    payload[(start_addr - 1) : (start_addr - 1 + len(channels))] = channels