def wheel(position):
    """Generate rainbow colors across 0-255 positions."""
    if position < 85:
        return position * 3, 255 - position * 3, 0
    elif position < 170:
        position -= 85
        return 255 - position * 3, 0, position * 3
    else:
        position -= 170
        return 0, position * 3, 255 - position * 3