def two_class_palette(x):
    """
    Returns the color palette for two class labels.

    0: blue
    1: red
    """
    if set(x) != set([0, 1]):
        raise ValueError('class labels not 0-1')

    pal = []
    for i in range(len(x)):
        if x[i] == 0:
            pal.append('blue')
        else:
            pal.append('red')
    return pal