def hue_to_rgb(hue):
    """
    Choose one of the 1536 fully saturated RGB colors. A fully saturated color
    is a color in the RGB space where one field is 0, another is 255, and a
    third is anything from 0 to 255. Similarly, it is a color in the HSV space
    where saturation and value are 100%, and hue is in [0, 360] degrees.

    hue     [int] : the color's hue that you want in the range [0, 1535].
    return [list] : 3 [int]'s in [0,255] corresponding to the RGB color.

    To understand the code better, look up a color wheel that can display RGB
    values. The fully saturated colors are all on the edge of the color wheel.
    Watch the values change as you move around the circumference.
    """

    if hue <= 255:  # green increasing
        return [255, hue % 256, 0]

    elif 255 < hue <= 511:  # red decreasing
        return [255 - (hue % 256), 255, 0]

    elif 511 < hue <= 767:  # blue increasing
        return [0, 255, hue % 256]

    elif 767 < hue <= 1023:  # green decreasing
        return [0, 255 - (hue % 256), 255]

    elif 1023 < hue <= 1279:  # red increasing
        return [hue % 256, 0, 255]

    else:  # 1279 < hue < 1535 ; blue decreasing
        return [255, 0, 255 - (hue % 256)]